Stud.IP  jlu_4.3 Revision 64286
ResourcePermissions Class Reference
Inheritance diagram for ResourcePermissions:
Inheritance graph
Collaboration diagram for ResourcePermissions:
Collaboration graph

Public Member Functions

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

Additional Inherited Members

- Protected Member Functions inherited from RouteMap
 extractConditions ($docblock, $conditions=array())
 
- Protected Attributes inherited from RouteMap
 $pagination = false
 
 $offset
 
 $limit
 

Detailed Description

This class provides API routes related to ResourcePermission and ResourceTemporaryPermission objects.

Member Function Documentation

◆ deletePermission()

deletePermission (   $resource_id = null,
  $user_id = null 
)

@delete /resources/permissions/:resource_id/:user_id

Here is the call graph for this function:

◆ deleteTemporaryPermission()

deleteTemporaryPermission (   $resource_id = null,
  $user_id = null 
)

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

@delete /resources/temporary_permissions/:resource_id/:user_id

Here is the call graph for this function:

◆ getPermission()

getPermission (   $resource_id = null,
  $user_id = null 
)

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

@get /resources/permissions/:resource_id/:user:_id

Here is the call graph for this function:

◆ getResourcePermissions()

getResourcePermissions (   $resource_id = null)

Get the permission levels of users for the specified resource.

Parameters
levelsLimit 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".

@get /resources/permissions/:resource_id

Here is the call graph for this function:

◆ getTemporaryPermission()

getTemporaryPermission (   $resource_id = null,
  $user_id = null 
)

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

@get /resources/temporary_permissions/:resource_id/:user:_id

Here is the call graph for this function:

◆ getTemporaryResourcePermissions()

getTemporaryResourcePermissions (   $resource_id = null)

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
beginThe begin timestamp of the time range.
endThe end timestamp of the time range.
levelsLimit 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".

@get /resources/temporary_permissions/:resource_id

Here is the call graph for this function:

◆ setPermission()

setPermission (   $resource_id = null,
  $user_id = null 
)
Postcondition
/resources/permissions/:resource_id/:user_id
Here is the call graph for this function:

◆ setTemporaryPermission()

setTemporaryPermission (   $resource_id = null,
  $user_id = null 
)
Postcondition
/resources/temporary_permissions/:resource_id/:user_id
Here is the call graph for this function:

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