Questions tagged [zfc-rbac]
21 questions
3
votes
1 answer
ZFC Rbac UnauthorizedStrategy and Zend Framework 3
I read the documentation on Strategies and it seems the code below is valid at least in Zend Framework 2. Of course, I tested it.
public function onBootstrap(EventInterface $e)
{
$t = $e->getTarget();
$t->getEventManager()->attach(
…

James Lloyd Atwil
- 31
- 6
3
votes
1 answer
ZfcRbac or BjyAuthorize or both to be used?
I am working on a Zendframework 2 project. I need to implement access control in to my application. This is my first time with zf. When I investigated about ACL i came across 2 modules ZfcRbac and BjyAuthorize. I am confused.
My Question is Should…

fSazy
- 326
- 1
- 4
- 16
2
votes
2 answers
ZfcRbac Role Provider and Identity getRoles()
I couldn't understand a concept when using ZfcRbac.
1. I use my own User entity with implementing ZfcRbac\Identity\IdentityInterface
2. This interface has addRole and getRoles methods and getRoles() should return array of Rbac\Role\RoleInterface so…

Fuat Sayra ÖZDEN
- 265
- 2
- 10
2
votes
0 answers
Use spiffy navigation with zfcrbac module
I'm trying to understand how spiffy-navigation works. I integrate the module, it's working very well. I have my navigation.
But the doc says :
Rbac specific options
role: required The role to use to determine if access is granted.
permission:…

Greco Jonathan
- 2,517
- 2
- 29
- 54
2
votes
1 answer
ZF2 Generate navigation using zfcrbac zfcUser and hierarchical role strategy
I begin in zf2 and i have to handle Many to Many permissions/roles. Using ZfcRbac.
So i make a mapping with User / Hierarchical Role (table name= role) / permissions
And i make some guards with deny policy.
My guard, mapping, database, are ok.
My…

Greco Jonathan
- 2,517
- 2
- 29
- 54
2
votes
1 answer
Zf2 - ZfcRbac / AuthenticationService - Doctrine2
I'm using ZfcRbac to handle my authorization and Zend\Authentication\AuthenticationService to handle authentication.
I've noticed in the Zend Developer Toolbar, each page request is showing 4 repetitive SQL queries.
1) Query users table based on…

jas
- 58
- 8
1
vote
1 answer
"Forgot password " for zfcuser
I am using zfcuser and zfcrbac. ZfcUser does not have "forgot password" (or reset password) functionality complete. What is the best module there to use for resetting password functionality ? Ideally, I'd like to use emails with tokenized links, but…

vlr
- 780
- 4
- 16
- 33
1
vote
0 answers
ZfcRbac does not recognise my logged in user role
ZfcRbac does not recognise my Identity role for some reason. I've been on it for hours but it can't seem to get the roles from my identity, which is strange because it can definitely be asked from the authentication…

Ventus
- 150
- 1
- 12
1
vote
1 answer
zfc-rbac module exception
I integrated the module zfcrbac in my application, apparently there's a problem! when I execute I get the following exception:
Fatal error: Uncaught exception 'Zend \ ServiceManager \ Exception \ ServiceNotCreatedException' with message 'While…

AiD
- 977
- 3
- 15
- 41
1
vote
1 answer
Acl vs RBAC in ZF2
I want to incorporate a component of access control in my application, I saw that ZF2 offer: Zend /permissions/Acl and Zend /permissions/RBAC, I would like to know which is more efficient and secured , and what about Zfc-RBAC ?
thank you .

AiD
- 977
- 3
- 15
- 41
1
vote
0 answers
Zend Navigation Helper not communicating with ZfcRbac
I have a problem implemented the ZfcRbac. At the moment the Rbac works and i enter a page on a certain url i will receive a 403. The code i used for this is the following:
'zfc_rbac' => array(
'guards' => array(
…

Dirkos
- 488
- 1
- 10
- 33
0
votes
1 answer
How do I use PHPUnit to test a Controller under ZFC RBAC
I am pretty new to unit testing and have just started my journey learning how to use tests to make my applications more reliable.
I am using Zend Framework 3 and am following this guide https://docs.zendframework.com/tutorials/unit-testing/
What I…

HappyCoder
- 5,985
- 6
- 42
- 73
0
votes
1 answer
Second ZfcRbac Assertion is not working | ZF2
I have added below code inside zfc_rbac.global.php:
return [
'zfc_rbac' => [
'assertion_map' => [
'isAuthorizedToAddUser' => 'Application\Assertions\WhoCanAddUser',
'isBranchOrOrgIdPresentIfNotAdmin' =>…

Vipul
- 655
- 2
- 6
- 22
0
votes
1 answer
Move guards to database in ZF2 application with ZfcRbac
I am using ZfcRbac for managing role-based access control for my ZF2 application. Currently I am controlling the access by updating the guards in zfc_rbac.global.php file in following way.
'guards' => [
'ZfcRbac\Guard\RouteGuard' => [
…

Muneer
- 7,384
- 7
- 38
- 62
0
votes
0 answers
ZendFramework 2 ZfcRbac module failing to instantiate ZfcRbac\Guard\RouteGuard
I was using successfully the ZfcRbac module for over a year but after my upgrade to ZF2 version 2.5 I'm getting the following error and I have no idea why this is happening, hope you can give me a hand to understand the problem:
Service…

markdrake
- 624
- 7
- 12