Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.
Next revision | Previous revision | ||
permissions [14/05/2010 11:17] creata |
permissions [05/06/2013 17:08] (versione attuale) |
||
---|---|---|---|
Linea 3: | Linea 3: | ||
//class PermissionsApiController extends ApiController//\\ | //class PermissionsApiController extends ApiController//\\ | ||
\\ | \\ | ||
- | * _call - ritorna ... | + | === _add === |
- | //Descrizione//: | + | Aggiunge un permesso.\\ |
- | _call($func, $args) | + | Descrizione: //_add($subject, $actions, $object, $owner)//\\ |
+ | Parametri: | ||
+ | * $subject - string | ||
+ | * $actions - string | ||
+ | * $object - string | ||
+ | * $owner - string | ||
+ | Return: void | ||
- | * _check - ritorna ... | + | === _addByRole === |
- | //Descrizione//: | + | Aggiunge un permesso attraverso il ruolo del soggetto.\\ |
- | _check($action, $object, $owner = null, $log = false) | + | Descrizione: //_addByRole($subject, $role, $object, $owner)//\\ |
+ | Parametri: | ||
+ | * $subject - string | ||
+ | * $role - string | ||
+ | * $object - string | ||
+ | * $owner - string | ||
+ | Return: boolean | ||
- | * _setWeight - ritorna ... | + | === _allow === |
- | //Descrizione//: | + | Permette al soggetto di compiere la determinata azione sul determinato oggetto.\\ |
- | _setWeight($owner, $subject, $object, $weight) | + | Descrizione: //_allow($subject, $action, $object, $owner, $weight)//\\ |
+ | Parametri: | ||
+ | * $subject - string | ||
+ | * $action - string | ||
+ | * $object - string | ||
+ | * $owner - string | ||
+ | * $weight - int | ||
+ | Return: boolean | ||
- | * _allow - ritorna ... | + | === _call === |
- | //Descrizione//: | + | Gestisce la cache e la convalida degli argomenti.\\ |
- | _allow($subject, $action, $object, $owner = null, $weight = 0) | + | Descrizione: //_call($func, $args)//\\ |
+ | Parametri: | ||
+ | * $func - string | ||
+ | * $args - string | ||
+ | Return: mixed | ||
- | * _deny - ritorna ... | + | === _check === |
- | //Descrizione//: | + | Controlla se il soggetto di default ha gli adeguati permessi per compiere una specifica azione.\\ |
- | _deny($subject, $action, $object, $owner = null, $weight = 0) | + | Descrizione: //_check($action, $object, $owner, $log)//\\ |
+ | Parametri: | ||
+ | * $action - string | ||
+ | * $object - string | ||
+ | * $owner - string | ||
+ | * $log - string | ||
+ | Return: mixed | ||
- | * _clear - ritorna ... | + | === _clear === |
- | //Descrizione//: | + | Disattiva il permesso corrispondente.\\ |
- | _clear($subject, $action, $object, $owner = null) | + | Descrizione: //_clear($subject, $action, $object, $owner)//\\ |
+ | Parametri: | ||
+ | * $subject - string | ||
+ | * $action - string | ||
+ | * $object - string | ||
+ | * $owner - string | ||
+ | Return: boolean | ||
- | * _add - ritorna ... | + | === _delete === |
- | //Descrizione//: | + | Elimina il permesso e il relativo proprietario.\\ |
- | _add($subject, $actions, $object, $owner = null) | + | Descrizione: //_delete($subject, $object, $owner)//\\ |
+ | Parametri: | ||
+ | * $subject - string | ||
+ | * $object - string | ||
+ | * $owner - string | ||
+ | Return: boolean | ||
- | * _getSubjectsByRole - ritorna ... | + | === _deny === |
- | //Descrizione//: | + | Nega al soggetto di fare la specificata azione sullo specificato oggetto.\\ |
- | _getSubjectsByRole($role, $object, $owner = null) | + | Descrizione: //_deny($subject, $action, $object, $owner, $weight)//\\ |
+ | Parametri: | ||
+ | * $subject - string | ||
+ | * $action - string | ||
+ | * $object - string | ||
+ | * $owner - string | ||
+ | * $weight - int | ||
+ | Return: boolean | ||
- | * _addByRole - ritorna ... | + | === _getPermissionsByObjects === |
- | //Descrizione//: | + | Ottiene i permessi su quell'oggetto.\\ |
- | _addByRole($subject, $role, $object, $owner = null) | + | Descrizione: //_getPermissionsByObjects($object, $owner)//\\ |
+ | Parametri: | ||
+ | * $object - string | ||
+ | * $owner - string | ||
+ | Return: array | ||
- | * _delete - ritorna ... | + | === _getPermissionsByOwner === |
- | //Descrizione//: | + | Ottiene i permessi tramite il proprietario.\\ |
- | _delete($subject, $object, $owner) | + | Descrizione: //_getPermissionsByOwner($owner)//\\ |
+ | Parametri: $owner - string\\ | ||
+ | Return: array | ||
- | * roleSync - ritorna ... | + | === _getPermissionsBySubjects === |
- | //Descrizione//: | + | Ottiene i permessi di quel soggetto.\\ |
- | roleSync($subject, $object, $owner = null) | + | Descrizione: //_getPermissionsBySubjects($subject, $owner)//\\ |
+ | Parametri: | ||
+ | * $subject - string | ||
+ | * $owner - string | ||
+ | Return: array | ||
- | * roleDiff - ritorna ... | + | === _getSubjectsByRole === |
- | //Descrizione//: | + | Ottiene i permessi attraverso i ruoli.\\ |
- | roleDiff($role, $permission) | + | Descrizione: // _getSubjectsByRole($role, $object, $owner)//\\ |
+ | Parametri: | ||
+ | * $role - string | ||
+ | * $object - string | ||
+ | * $owner - string | ||
+ | Return: array | ||
- | * _getPermissionsBySubjects - ritorna ... | + | === _setWeight === |
- | //Descrizione//: | + | Imposta il peso del permesso.\\ |
- | _getPermissionsBySubjects($subject, $owner = null) | + | Descrizione: //_setWeight($owner, $subject, $object, $weight)//\\ |
+ | Parametri: | ||
+ | * $owner - string | ||
+ | * $subject - string | ||
+ | * $object - string | ||
+ | * $weight - int | ||
+ | Return: void | ||
- | * _getPermissionsByObjects - ritorna ... | + | === getSubject === |
- | //Descrizione//: | + | Ritorna il soggetto.\\ |
- | _getPermissionsByObjects($object, $owner = null) | + | Descrizione: //getSubject($subject)//\\ |
+ | Parametri: $subject - string\\ | ||
+ | Return: string | ||
- | * _getPermissionsByOwner - ritorna ... | + | === permissionsGetActions === |
- | //Descrizione//: | + | Ritorna un array contenente le azioni prodotte dal modulo.\\ |
- | _getPermissionsByOwner($owner) | + | Descrizione: //permissionsGetActions()//\\ |
+ | Parametri: nessun parametro\\ | ||
+ | Return: array | ||
- | * getSubject - ritorna ... | + | === permissionsGetObjects === |
- | //Descrizione//: | + | Ritorna un array contenente gli oggetti prodotti dal modulo.\\ |
- | getSubject($subject) | + | Descrizione: //permissionsGetObjects()//\\ |
+ | Parametri: nessun parametro\\ | ||
+ | Return: array | ||
- | * permissionsGetObjects - ritorna ... | + | === roleDiff === |
- | //Descrizione//: | + | ...\\ |
- | permissionsGetObjects() | + | Descrizione: //roleDiff($role, $permission)//\\ |
+ | Parametri: | ||
+ | * $role - string | ||
+ | * $permission - string | ||
+ | Return: boolean | ||
- | * permissionsGetActions - ritorna ... | + | === roleSync === |
- | //Descrizione//: | + | ...\\ |
- | permissionsGetActions() | + | Descrizione: //roleSync($subject, $object, $owner)//\\ |
+ | Parametri: | ||
+ | * $subject - string | ||
+ | * $object - string | ||
+ | * $owner - string | ||
+ | Return: boolean | ||
- | * viewpermissions - ritorna ... | + | === viewpermissions === |
- | //Descrizione//: | + | Visualizza i permessi.\\ |
- | viewpermissions($owner, $id) | + | Descrizione: //viewpermissions($owner, $id)//\\ |
+ | Parametri: | ||
+ | * $owner - string | ||
+ | * $id - int | ||
+ | Return: void |