Sebastiaan

Results 13 comments of Sebastiaan

Something to think about.. If your application services in the form of an http api behind an nginx proxy you could setup a location in nginx to manipulate keys on...

Some numbers benching this: Don't take them too seriously as these benchmarks were performed on a single machine running all the services (proxy / multiple app instances) and the benchmark...

Just out of curiosity, should you not also check for assertions when going thru the parent roles? Also in the RoleManager method createDefaultRolesIfNotExist() when setting default roles with a parent...

> Hello Oleg, > > Although it's been some time :) i can confirm this issue. > > The problem is your implementation of inheritance assumes Children roles inherit from...

@x-dragos I believe the phrase you are referring to is recursive inheritance checking? That is exactly what this code segment located at the bottom of rbacManager isGranted function does: ```...

> ok, fixxed that one too. Apparently, the way Zend creates the Rbac Object is rather wiered. > > fixed it by going through the roles in reverse order. >...

> I'll have another look but at the moment ... it looks to me like Rbac is not creating the proper object. > > it overwrites the roles that it...

@x-dragos I see what you are trying to do but doesn't that simply move the problem up one level? What if the parent role you are checking for has parent...

@x-dragos Okay, example: Add 3 roles that depend on each other. Administrator < Manager < Client All 3 roles are added yes, but they do not have their children set...

The code i use now is: (RbacManager->init) ``` ... $roles = $this->entityManager->getRepository(RoleEntity::class)->findBy([]); // Add all roles to rbac foreach ($roles as $role) { $roleName = $role->getName(); if (!$rbac->hasRole($roleName)) { //...