Hi Kyle, how are you?
I’m testing zfcrbac, interested on implement this on my sites.
I run zfcuser as identity provider. I can login, and obtain the identity object within my module’s controllers . I wrote a method for do this:
public function getIdentity(){ if (!$this->rbac) { $sm = $this->getServiceLocator(); $auth = $sm->get(‘zfcuser_auth_service’); } return $this->identity = $auth; }
My doubt is about how I can access to zfcrbac methods within my controllers. I need to assign some roles to users.
I think that I should do something as:
$rbac->addRole(‘user’,'role’);
Where $rbac points to the persistent object created by service manager.
I come to you because I can not find documentation on this subject.
Thanks in advance.
H4
Hi Kyle, how are you?
I’m testing zfcrbac, interested on implement this on my sites.
I run zfcuser as identity provider. I can login, and obtain the identity object within my module’s controllers . I wrote a method for do this:
public function getIdentity(){
if (!$this->rbac) {
$sm = $this->getServiceLocator();
$auth = $sm->get(‘zfcuser_auth_service’);
}
return $this->identity = $auth;
}
My doubt is about how I can access to zfcrbac methods within my controllers.
I need to assign some roles to users.
I think that I should do something as:
$rbac->addRole(‘user’,'role’);
Where $rbac points to the persistent object created by service manager.
I come to you because I can not find documentation on this subject.
Thanks in advance.
H4