Skip to content

Hooks are executed with a potentially wrong user #16

@LostKobrakai

Description

@LostKobrakai

Both of the hooks to the user class (https://github.com/ryancramerdesign/DynamicRoles/blob/master/DynamicRoleSupport.module#L78-L79) are using $this->wire('user') instead of $event->object. While this is probably not a to big a issue in terms of denying access where needed it's still resulting in wrong results for example when calling $page->viewable($user) for a user other than the current one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions