mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
fix listUserClassPermissions()
This commit is contained in:
@@ -368,10 +368,8 @@ class ToolRepository extends BaseRepository
|
||||
{
|
||||
$userInfo = get_user_row($uid);
|
||||
$prefix = "authority";
|
||||
$excludes = collect(Setting::$permissionMustHaveClass)->map(fn ($p) => "$prefix.$p")->toArray();
|
||||
return Setting::query()
|
||||
->where("name", "like", "$prefix.%")
|
||||
->whereNotIn('name', $excludes)
|
||||
->where('value', '<=', $userInfo['class'])
|
||||
->where('value', '>=', User::CLASS_PEASANT)
|
||||
->pluck('name')
|
||||
@@ -379,7 +377,6 @@ class ToolRepository extends BaseRepository
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
||||
public static function listUserAllPermissions($uid): array
|
||||
{
|
||||
return NexusDB::remember("user_{$uid}_permissions", 600, function () use ($uid) {
|
||||
|
||||
Reference in New Issue
Block a user