mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-10-23 18:48:37 +03:00
Permissions: Updated usage of controller methods to use enum
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace BookStack\Users\Controllers;
|
||||
|
||||
use BookStack\Http\ApiController;
|
||||
use BookStack\Permissions\Permission;
|
||||
use BookStack\Permissions\PermissionsRepo;
|
||||
use BookStack\Users\Models\Role;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -38,7 +39,7 @@ class RoleApiController extends ApiController
|
||||
) {
|
||||
// Checks for all endpoints in this controller
|
||||
$this->middleware(function ($request, $next) {
|
||||
$this->checkPermission('user-roles-manage');
|
||||
$this->checkPermission(Permission::UserRolesManage);
|
||||
|
||||
return $next($request);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user