public function getRolesByPrivilege($privilege)
    {
        $roles = array();

        if ($this->acl) {
            foreach ($this->acl->getRoles() as $role) {
                if ($this->acl->isAllowed($role, null, $privilege)) {
                    //Do not translate, only make first one uppercase
                    $roles[$role] = ucfirst($role);
                }
            }
        }

        return $roles;
    }
public function getRolesByPrivilege($privilege)
    {
        $roles = array();

        if ($this->acl) {
            foreach ($this->acl->getRoles() as $role) {
                if ($this->acl->isAllowed($role, null, $privilege)) {
                    //Do not translate, only make first one uppercase
                    $roles[$role] = ucfirst($role);
                }
            }
        }

        return $roles;
    }
public function getRolesByPrivilege ( $ privilege ) { $ roles = array ( ) ; if ( $ this -> acl ) { foreach ( $ this -> acl -> getRoles ( ) as $ role ) { if ( $ this -> acl -> isAllowed ( $ role , null , $ privilege ) ) { //Do not translate, only make first one uppercase $ roles [ $ role ] = ucfirst ( $ role ) ; } } } return $ roles ; }
Returns the roles in the acl with the privilege

@return array roleId => ucfirst(roleId)
Returns the roles in the acl with the privilege