]> BookStack Code Mirror - bookstack/blobdiff - app/Users/Controllers/UserSearchController.php
Permissions: Cleanup after review of enum implementation PR
[bookstack] / app / Users / Controllers / UserSearchController.php
index a6596046a102fdee9596ccadbf042f81cf1b187a..a2543b7eed32723d5f8052d9f0365c46cdd6efc9 100644 (file)
@@ -3,6 +3,7 @@
 namespace BookStack\Users\Controllers;
 
 use BookStack\Http\Controller;
+use BookStack\Permissions\Permission;
 use BookStack\Users\Models\User;
 use Illuminate\Http\Request;
 
@@ -15,9 +16,9 @@ class UserSearchController extends Controller
     public function forSelect(Request $request)
     {
         $hasPermission = !user()->isGuest() && (
-            userCan(\BookStack\Permissions\Permission::UsersManage)
-                || userCan(\BookStack\Permissions\Permission::RestrictionsManageOwn)
-                || userCan(\BookStack\Permissions\Permission::RestrictionsManageAll)
+            userCan(Permission::UsersManage)
+                || userCan(Permission::RestrictionsManageOwn)
+                || userCan(Permission::RestrictionsManageAll)
         );
 
         if (!$hasPermission) {