Stud.IP  5.4
 All Data Structures Namespaces Files Functions Variables Groups
ResourcePermissions Class Reference
Inheritance diagram for ResourcePermissions:
RouteMap

Public Member Functions

 getResourcePermissions ($resource_id)
 
 getPermission ($resource_id, $user_id)
 
 setPermission ($resource_id, $user_id)
 
 deletePermission ($resource_id, $user_id)
 
 getTemporaryResourcePermissions ($resource_id)
 
 getTemporaryPermission ($resource_id, $user_id)
 
 setTemporaryPermission ($resource_id, $user_id)
 
 deleteTemporaryPermission ($resource_id, $user_id)
 
- Public Member Functions inherited from RouteMap
 __construct ()
 
 init ($router, $route)
 
 paginated ($data, $total, $uri_params=[], $query_params=[])
 
 paginate ($uri_format, $total, $offset=null, $limit=null)
 
 collect ($data)
 
 status ($status)
 
 headers ($headers=[])
 
 body ($body)
 
 contentType ($mime_type, $params=[])
 
 error ($status, $body=null)
 
 etag ($value, $strong_etag=true, $new_resource=null)
 
 expires ($amount, $cache_control=[])
 
 cacheControl ($values)
 
 halt ()
 
 lastModified ($time)
 
 notFound ($body=null)
 
 redirect ($url, $args=null)
 
 sendFile ($_path, $opts=[])
 
 url ($addr, $url_params=null)
 
 urlf ($addr_f, $format_params, $url_params=null)
 
 getRoutes ($http_method=null)
 
 getResponse ()
 

Additional Inherited Members

- Protected Member Functions inherited from RouteMap
 extractConditions ($docblock, $conditions=[])
 
- Protected Attributes inherited from RouteMap
 $router
 
 $route
 
 $data = null
 
 $response
 
 $pagination = false
 
 $offset
 
 $limit
 

Detailed Description

This file contains API routes related to ResourcePermission and ResourceTemporaryPermission objects.

Author
Moritz Strohm stroh.nosp@m.m@da.nosp@m.ta-qu.nosp@m.est..nosp@m.de
Since
4.5

Member Function Documentation

deletePermission (   $resource_id,
  $user_id 
)

/resources/permissions/:resource_id/:user_id

deleteTemporaryPermission (   $resource_id,
  $user_id 
)

Deletes all temporary permissions of a user. If a time interval is given all permissions inside the interval are deleted.

/resources/temporary_permissions/:resource_id/:user_id

getPermission (   $resource_id,
  $user_id 
)

Returns the permissions a specific user has on a specified resource.

/resources/permissions/:resource_id/:user:_id

getResourcePermissions (   $resource_id)

Get the permission levels of users for the specified resource.

Parameters
levels,:Limit the result set to the specified permission levels. Allowed permission levels: user, autor, tutor, admin. The permission levels have to be comma separated like in the following example: "autor,tutor,admin".

/resources/permissions/:resource_id

getTemporaryPermission (   $resource_id,
  $user_id 
)

Returns the permissions a specific user has on a specified resource.

/resources/temporary_permissions/:resource_id/:user:_id

getTemporaryResourcePermissions (   $resource_id)

Get the temporary permission levels of users for the specified resource. The begin and end parameters are mandatory to determine a time range to collect the temporary permissions in that range.

Parameters
begin,:The begin timestamp of the time range.
end,:The end timestamp of the time range.
levels,:Limit the result set to the specified temporary permission levels. Allowed permission levels: user, autor, tutor, admin. The permission levels have to be comma separated like in the following example: "autor,tutor,admin".

/resources/temporary_permissions/:resource_id

setPermission (   $resource_id,
  $user_id 
)
Postcondition
/resources/permissions/:resource_id/:user_id
setTemporaryPermission (   $resource_id,
  $user_id 
)

Sets temporary permissions for a user.

Parameters
beginThe begin timestamp for the temporary permisssion.
endThe end timestamp for the temporary permission.
permsThe permission level for the temporary permission.
Postcondition
/resources/temporary_permissions/:resource_id/:user_id

The documentation for this class was generated from the following file: