PermissionApiController
extends Controller
in package
Table of Contents
- get() : JsonResponse
- Returns a single or all permissions
- user() : JsonResponse
- Returns the permissions of the requested, or authenticated user Requesting the permissions of other users requires the permission: admin.permissions.permission.get You can filter the permissions via the "type" parameter. Use: all, role or direct.
Methods
get()
Returns a single or all permissions
public
get([int|null $id = null ]) : JsonResponse
Parameters
- $id : int|null = null
Return values
JsonResponse —an array of permissions
user()
Returns the permissions of the requested, or authenticated user Requesting the permissions of other users requires the permission: admin.permissions.permission.get You can filter the permissions via the "type" parameter. Use: all, role or direct.
public
user(Request $request[, string $uuid = null ][, string $type = "all" ]) : JsonResponse
All will return the combined permissions from both direct-user permissions, and the inherited roles Role will return only the permissions inherited from roles Direct will return only the permissions directly assigned to the user
Parameters
- $request : Request
- $uuid : string = null
- $type : string = "all"
Return values
JsonResponse —an array of permissions