Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

Use canOne instead of can so we can resolve the conflicts with authorization #139

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Use canOne instead of can so we can resolve the conflicts with authorization #139

wants to merge 1 commit into from

Conversation

Ricky-rick
Copy link

Call the 'canOne' function instead of the 'can' function in the Middleware and ServiceProvider so we can make us of Laravel's authorization 'can' function.
Now it's posible to use the Authorizable and the HasRoleAndPermission trait in the user model

class User extends Model implements AuthenticatableContract, HasRoleAndPermissionContract
{
    use Authenticatable, HasRoleAndPermission, Authorizable {
        Authorizable::can insteadof HasRoleAndPermission;
        HasRoleAndPermission::can as hasRoleAndPermissionCan;
    }
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant