<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[
Zend_RBAC is a compunent used to determine if a user has access to a resource.Zend Framework: Zend_RBAC Component Proposal
Proposed Component Name
Zend_RBAC
Developer Notes
http://framework.zend.com/wiki/display/ZFDEV/Zend_RBAC
Proposers
Dolf Schimmel (Freeaqingme)
Zend Liaison
TBD
Revision
0.5 - 17 December 1909: Initial Draft. (wiki revision: 3)
Table of Contents
1. Overview
2. References
3. Component Requirements, Constraints, and Acceptance Criteria
- A user CAN be member of one or more roles
- A role CAN be the parent of one or more other roles
- An object CAN be assigned to one or more roles
- If a user is member of a role (or any of the role's childs) to which the
requested object was assigned, the user MUST be allowed access. Otherwise, MUST NOT.
4. Dependencies on Other Framework Components
Soft;
- Zend_Exception
Optional:
- Zend_Db
5. Theory of Operation
Zend_RBAC is a component that can be used to determine whether a subject (user) that has one or more roles, has access to a certain resource, after you have defined the available resources, roles and users. One does only allow (not disallow) roles access to resources, assign users to roles, and determine if any roles inherit from other roles.
Following example based on [1]:
Interns can do everything a healer can do
Doctors can do everything an intern can
Healers have access to object 1 & 2 only
Interns have access to object 1, 2, 3 & 4 only
Doctors have access to object 1, 2, 3, 4, 5 & 6 only
6. Milestones / Tasks
Describe some intermediate state of this component in terms of design notes, additional material added to this page, and / code. Note any significant dependencies here, such as, "Milestone #3 can not be completed until feature Foo has been added to ZF component XYZ." Milestones will be required for acceptance of future proposals. They are not hard, and many times you will only need to think of the first three below.
- Milestone 1: design notes will be published here
- Milestone 2: Working prototype checked into the incubator supporting use cases #1, #2, ...
- Milestone 3: Working prototype checked into the incubator supporting use cases #3 and #4.
- Milestone 4: Unit tests exist, work, and are checked into SVN.
- Milestone 5: Initial documentation exists.
If a milestone is already done, begin the description with "[DONE]", like this:
- Milestone #: [DONE] Unit tests ...
7. Class Index
- Zend_Rbac
- Zend_Rbac_Subject
- Zend_Rbac_Role
- Zend_Rbac_Resource
- Zend_Rbac_Adapter_DbTable
- Zend_Rbac_Assert_?
- More_To_Come?
8. Use Cases
| UC-01 |
|---|
The following code implements the given scenario under 'operation'