Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable default policies #58

Open
mucyomiller opened this issue Jun 23, 2020 · 0 comments
Open

Disable default policies #58

mucyomiller opened this issue Jun 23, 2020 · 0 comments

Comments

@mucyomiller
Copy link

mucyomiller commented Jun 23, 2020

I don't see a way to disable or changes these default policies registered, for instance, I have defined my own in App\Providers\AutheServiceProvider likes this
Screenshot from 2020-06-23 12-32-12
but with this one defined in novatoolpermissions I do see a way to disable the one I don't want to use

 private function defineGates()
    {
        collect([
            'assignRoles',
            'manageRoles',
            'manageUsers',
            'viewRoles',
            'viewUsers',
            'viewNova',
            'canBeGivenAccess',
        ])->each(function ($permission) {
            Gate::define($permission, function ($user) use ($permission) {
                if ($this->nobodyHasAccess($permission)) {
                    return true;
                }

                return $user->hasRoleWithPermission($permission);
            });
        });
    }

I got duplicates Manage Users, View Users I want the best way to disable these default one's without changing it into the vendor folder

Screenshot from 2020-06-23 12-35-19

yayann added a commit to SGS-Optimisation/novatoolpermissions that referenced this issue Jan 23, 2023
flagged rules mail notifications and reminders
yayann added a commit to SGS-Optimisation/novatoolpermissions that referenced this issue Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant