call code iff user is logged in
Disable a route without having to comment out the entry in the routes file.
Disable a route without having to comment out the entry in the routes file. Useful for when we want to keep the code around but we don't want users to have access to it.
call code iff user has right permission for resource
Use when you want to require the user to be logged in on a private server or the server is public.
call code iff user is a server admin
get user if logged in
Return user based on request object
Action builders check permissions in API calls. When creating a new endpoint, pick one of the actions defined below.
All functions will always resolve the usr and place the user in the request.user.
UserAction: call the wrapped code, no checks are done AuthenticatedAction: call the wrapped code iff the user is logged in. ServerAdminAction: call the wrapped code iff the user is a server admin. PermissionAction: call the wrapped code iff the user has the right permission on the reference object.