General: Use library functions for permissions and features
- Status
- Pending
- Subject
- General: Use library functions for permissions and features
- Version
- 2.x
- Category
- Feature request
- Feature
- All / Undefined
Permission - Resolution status
- Partially solved
- Submitted by
- Ralph Bolton
- Lastmod by
- Marc Laporte
- Rating
- Description
I would suggest the creation of two simple tikilib functions: have_permission() and feature_enabled(). These functions need to take the name of a Tiki permission or feature respectively, and should return a boolean if the permission is set, or feature enabled.
These two functions are obviously pretty simple to implement. After their introduction, all Tiki applications should be migrated to use them (a job I would suggest may take until 1.11 or later!).
The benefits of doing this include:
- Less programatic reliance on global variables
- No need to read entire permissions or feature database tables to return each page
- Lower in-memory information required to run the application
- Allows for finer grained permissions and feature control without affecting scalability
- Permissions and features can subsequently be replaced by more sophisticated, scalable, usable or effective solutions later without futher disruption to applications.
The last point is the key here: Whilst there are currently hundreds of permissions and features, there are lacking in places where they should exist. Clearly adding yet more permissions and features isn't really viable.Also, having a replaceable solution means it would be possible to move to an "entitlements" based solution without breaking the entire system. Entitlements may offer a way to provide extreme customisation abilities, with scalable and flexible permissioning, control of features etc.
The subject of permissions and feature control is obviously broad. This RFE only aims to facilitate the future discussion and adoption of a more generic model for control of the application.
- Importance
- 5
- Priority
- 25
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is currently unavailableUnable to connect to show.tikiwiki.org. Please let us know of the problem so that we can do something about it. Thanks.
- Ticket ID
- 220
- Created
- Sunday 05 June, 2005 16:51:44 UTC
by Unknown - LastModif
- Friday 15 January, 2010 23:53:05 UTC