[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/class/dao/ -> userpermissions.class.php (sommaire)

(pas de description)

Poids: 242 lignes (7 kb)
Inclus ou requis:0 fois
Référencé: 15 fois
Nécessite: 0 fichiers

Définit 1 class

UserPermissions:: (10 méthodes):
  UserPermissions()
  getUserPermissions()
  grantPermission()
  revokePermission()
  revokePermissions()
  revokeBlogPermissions()
  revokeUserPermissions()
  getNumUsersWithPermission()
  getUsersWithPermission()
  mapRow()


Classe: UserPermissions  - X-Ref

Handles user permissions.

\ingroup DAO
UserPermissions()   X-Ref
Pas de description

getUserPermissions( $userId, $blogId )   X-Ref
Retrieves the permissions for a given user.

param: userId The user identifier
param: blogId The blog identifier
return: An Array of UserPermission objects with all the different permissions

grantPermission( &$perm, $doNotCleanCache = false )   X-Ref
Grants a permission to a user, for a given blog.
Any permission can be granted, as long as it exists.

param: perm A UserPermission object containing information abotu the permissions
param: doNotCleanCache Whether we should ignore the code that triggers the cache. You should
return: Returns true if the permission was set or already existed, or false

revokePermission( $userId, $blogId, $permissionId )   X-Ref
Removes a permission from a user, for a given blog.

param: userId The user which will be revoked the permission
param: blogId The blog to which this permission will be revoked
param: permissionId The identifier of the permission that will be revoked
return: Returns true if the permission didn't exist or if the permission was

revokePermissions( $userId, $blogId )   X-Ref
Removes all the user permissions from a given blog

param: userId
param: blogId
return: True if successful or false otherwise

revokeBlogPermissions( $blogId )   X-Ref
removes all the permissions for a given blog, useful when we're removing
the blog from the database.

param: blogId The blog from which we'd like to remove the permissions.
return: true

revokeUserPermissions( $userId )   X-Ref
revokes all the permissions that a user may have

param: userId The identifier of the user
return: true

getNumUsersWithPermission( $permId )   X-Ref
Returns the number of users who have a certain permission

param: permId

getUsersWithPermission( $permId, $page = -1, $itemsPerPage = DEFAULT_ITEMS_PER_PAGE )   X-Ref
Returns all users who have the given permission, using paging if necessary

param: permId
param: page
param: itemsPerPage

mapRow( $row )   X-Ref




Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics