PHP Class Action_Helper_Acl

Inheritance: extends Zend_Controller_Action_Helper_Abstract
Show file Open project: sourcefabric/newscoop

Public Methods

Method Description
check ( $resource, $action ) : void Check permissions and redirect to error screen if not allowed
getAcl ( Zend_Acl_Role_Interface $role ) : Zend_Acl Get Acl
init ( ) : Zend_Acl Init
isAllowed ( $resource, $action = NULL, $user = NULL ) : boolean Permission check
setUser ( User $user ) : Action_Helper_Acl Set current user

Private Methods

Method Description
getCurrentUser ( ) : User Get current user

Method Details

check() public method

Check permissions and redirect to error screen if not allowed
public check ( $resource, $action ) : void
return void

getAcl() public method

Get Acl
public getAcl ( Zend_Acl_Role_Interface $role ) : Zend_Acl
$role Zend_Acl_Role_Interface
return Zend_Acl

init() public method

Init
public init ( ) : Zend_Acl
return Zend_Acl

isAllowed() public method

Permission check
public isAllowed ( $resource, $action = NULL, $user = NULL ) : boolean
return boolean

setUser() public method

Set current user
public setUser ( User $user ) : Action_Helper_Acl
$user Newscoop\Entity\User
return Action_Helper_Acl