This repository was archived by the owner on Jan 30, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed
Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -103,10 +103,26 @@ having inherited conflicting rules from different parent roles.
103103rule that is directly applicable to the query. In this case, since the "member" role is examined
104104before the "guest" role, the example code would print "allowed".
105105
106- > #### LIFO Order for role queries
107- >
108- > When specifying multiple parents for a role, keep in mind that the last parent listed is the first
109- > one searched for rules applicable to an authorization query.
106+
107+ ### LIFO/FILO order for Role parents
108+
109+ When specifying multiple parents for a role the last parent listed is the first
110+ one searched for rules applicable to an authorization query. This Last-In-First-Out
111+ (aka First-In-Last-Out) strategy is represented with this example.
112+ Here the ` first ` role is the highest order:
113+
114+ ```
115+ $acl->addRole(new Role('first'), ['last', 'third', 'second']);
116+ ```
117+
118+ Less-permissioned roles will be first in the parents array. For instance, where a` guest `
119+ role is unauthenticated, a ` user ` role is authenticated, and an ` admin ` role has the highest
120+ permissions, adding the ` admin ` role is as follows:
121+
122+ ```
123+ $acl->addRole(new Role('admin'), ['guest', 'user']);
124+ ```
125+
110126
111127## Creating the Access Control List
112128
You can’t perform that action at this time.
0 commit comments