zend-acl

ACL Ressource (Controller)

风流意气都作罢 提交于 2020-01-06 20:14:36
问题 i just implemented ACL in my Zend Framework which already uses Zend Auth. I want to give access to some controllers and tried it this way: $roleGuest = new Zend_Acl_Role('guest'); $this->addRole($roleGuest); $this->addRole(new Zend_Acl_Role('supplier')); $this->addRole(new Zend_Acl_Role('admin')); $this->add(new Zend_Acl_Resource('Articles')); $this->add(new Zend_Acl_Resource('Index')); $this->deny(); $this->allow('supplier', 'Articles'); $this->allow('admin', null); But a user, who is

Zend_ACL : How to design Role based ACL for multiple small teams?

余生长醉 提交于 2020-01-06 05:45:30
问题 How role based ACL should be designed for : Multiple teams, each team consisting of one manager and multiple members and working from one location. Each location could have multiple teams and there are multiple locations. Manager of each team could only view/edit data for his team members. A person could also be member of multiple teams, independent of location. Location_1 -Team_1 -Team_2 -Manager -Manager -Member_1 -Member_1 -Member_2 -Member_2 Location_2 -Team_1 -Team_2 -Manager -Manager

Zend_ACL : How to design Role based ACL for multiple small teams?

◇◆丶佛笑我妖孽 提交于 2020-01-06 05:45:05
问题 How role based ACL should be designed for : Multiple teams, each team consisting of one manager and multiple members and working from one location. Each location could have multiple teams and there are multiple locations. Manager of each team could only view/edit data for his team members. A person could also be member of multiple teams, independent of location. Location_1 -Team_1 -Team_2 -Manager -Manager -Member_1 -Member_1 -Member_2 -Member_2 Location_2 -Team_1 -Team_2 -Manager -Manager

ZF2 ACL check link in view

痞子三分冷 提交于 2019-12-25 08:58:51
问题 I have set up my roles, resources and permissions in my bootstrap, and in my layout have set up a navigation menu based on this, and this works. What I am attempting to do now is create an admin panel with edit / delete links IF the current logged in user has those permissions. e.g. I may have multiple roles that can view a list of cms pages, but only certain roles can edit a cms page, and only certain roles can delete a cms page. At the moment I am just checking if the user is logged in: <

Dynamic custom ACL in zend framework?

给你一囗甜甜゛ 提交于 2019-12-19 11:49:20
问题 I need a solution where authenticated users are allowed access to certain Controllers/Actions based not on their user type :ie. admin or normal user (although I may add this using standard ACL later) but according to the current status of their user. For example : Have they been a member of the site for more than 1 week? Have they filled in their profile fully? Actually, now that I think about it, kind of like they have on this site with their priviledges and badges. 回答1: For dynamic

double slash in URLs.

拥有回忆 提交于 2019-12-14 03:11:49
问题 Zend Route issue. Normally it works fine. http://www.example.com/course-details/1/Physics-Newtons-Law But if I type in an extra slash in the url, the noauthAction of my Error controller gets called. Example of URL's that are not working. http://www.example.com/course-details//1/Physics-Newtons-Law http://www.example.com/course-details/1//Physics-Newtons-Law Is there something I need to set in the route definition to allow extra slashes? Routing in application.ini resources.router.routes

how to get role from Zend_Auth/Zend_ACL when using a Doctrine adapter? getting all work together

拜拜、爱过 提交于 2019-12-13 17:33:15
问题 I'm using Zend_Auth with a project using doctrine.I believe every bootstrapping is done correctly and i can log in. my adapter looks like this: class Abra_Auth_Adapter_Doctrine implements Zend_Auth_Adapter_Interface { protected $_resultArray; private $username; private $password; public function __construct($username, $password) { $this->username = $username; $this->password = $password; } //based on feedbacks as response authenticate has changed to this public function authenticate() { $q =

Could not create navigation based on Zend_Acl

本秂侑毒 提交于 2019-12-11 18:22:35
问题 I am trying to learn to create navigation with Zend_Acl. But the navigation only displays for admin and no one else. I have read through my code and I tried to trace the code that comes with ZendFramework. But I am stuck and I can't figure out what I am doing wrong. Here is my acl class: class Application_Model_LibraryACL extends Zend_Acl { public function __construct() { $this->add(new Zend_Acl_Resource( 'guestbook' ) ); $this->add( new Zend_Acl_Resource( 'index' ) ); $this->add(new Zend_Acl

How to build an ACL Assertion for a variable value in Zend Framework 2?

北慕城南 提交于 2019-12-10 18:03:37
问题 I have a simple ACL configures in an acl.global.php like this: return [ 'acl' => [ 'roles' => [ 'guest' => null, 'member' => 'guest', 'admin' => 'member' ], 'resources' => [ 'allow' => [ 'Application\Controller\Index' => ['all' => 'member'], 'Application\Controller\Error' => ['all' => 'member'], 'Item\Controller\Process' => [ 'index' => 'member', 'create' => 'member', 'showItem' => 'member', // website.tld/item/:id 'showList' => 'member' // website.tld/list-items ] ] ], ] ]; A parser iterates

Whats the way to use Zend_Acl in View to show/hide parts of view

拜拜、爱过 提交于 2019-12-09 13:09:30
问题 I am wondering whats the way to use Zend_Acl to show/hide parts of view? I am thinking I will Create a Controller Plugin that passes the logged in user + acl to view $this->view->loggedInUser = Zend_Auth::getIdentity(); $this->view->acl = Zend_Registry::get('acl'); Then in view scripts do something like $this->acl->isAllowed($this->view->loggedInUser, 'resource', 'privilege'); Or is there a better way? Or should I use a View Helper? That returns a boolean whether the logged in user is allowed