Zend Framework

consistency: addRole() adds a role, but there is not addResource()

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Trivial Trivial
  • Resolution: Fixed
  • Affects Version/s: 0.8.0, 0.9.0, 0.9.1
  • Fix Version/s: 1.9.1
  • Component/s: Zend_Acl
  • Labels:
    None

Description

To me, the presence of the method addRole(), and the lack of a corresponding method addResource() looks like an inconsistency.
Given our past diligence to resolve inconsistencies, this issue can record a decision regarding this for future reference.

Activity

Hide
Marc Jakubowski added a comment -

That´s what the add() method is there for, isn´t it?
Is this issue only about the name or am I missing someting obvious?

Show
Marc Jakubowski added a comment - That´s what the add() method is there for, isn´t it? Is this issue only about the name or am I missing someting obvious?
Hide
Wil Sinclair added a comment -

This issue should have been fixed for the 1.5 release.

Show
Wil Sinclair added a comment - This issue should have been fixed for the 1.5 release.
Hide
Wil Sinclair added a comment -

This doesn't appear to have been fixed in 1.5.0. Please update if this is not correct.

Show
Wil Sinclair added a comment - This doesn't appear to have been fixed in 1.5.0. Please update if this is not correct.
Hide
Wil Sinclair added a comment -

Let's decide if we think this is worth doing and fix or close down the issue as necessary.

Show
Wil Sinclair added a comment - Let's decide if we think this is worth doing and fix or close down the issue as necessary.
Hide
Wil Sinclair added a comment -

Assigning to Ralph to get closure on this issues.

Show
Wil Sinclair added a comment - Assigning to Ralph to get closure on this issues.
Hide
Sebastian Krebs added a comment - - edited

Method found in current rev 17577 of 1.9 branch, thanks for that.
But now there is the inconsistency, that the other resource related methods has not their "Resource" suffix

  • has() --> hasResource()
  • remove() --> removeResource()
  • removeAll() --> removeResourceAll()
  • get() --> getResource()

I would also prefer to rename the "remove*All()" methods to "clear*()" as ... they sounds strange ^^

  • removeRoleAll() -> clearRoles()
  • removeResourceAll() -> clearResources()
    Just a suggestion
Show
Sebastian Krebs added a comment - - edited Method found in current rev 17577 of 1.9 branch, thanks for that. But now there is the inconsistency, that the other resource related methods has not their "Resource" suffix
  • has() --> hasResource()
  • remove() --> removeResource()
  • removeAll() --> removeResourceAll()
  • get() --> getResource()
I would also prefer to rename the "remove*All()" methods to "clear*()" as ... they sounds strange ^^
  • removeRoleAll() -> clearRoles()
  • removeResourceAll() -> clearResources() Just a suggestion

People

Vote (2)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
2h
Original Estimate - 2 hours
Remaining:
2h
Remaining Estimate - 2 hours
Logged:
Not Specified
Time Spent - Not Specified