mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
Added gate to auth service provider
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
52c4885335
commit
2b43f3cb84
|
@ -232,5 +232,12 @@ class AuthServiceProvider extends ServiceProvider
|
||||||
|| $user->can('update', User::class)
|
|| $user->can('update', User::class)
|
||||||
|| $user->can('create', User::class);
|
|| $user->can('create', User::class);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// This determines whether the user can edit their profile based on the setting in Admin > General
|
||||||
|
Gate::define('self.profile', function ($user) {
|
||||||
|
return $user->canEditProfile();
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue