Introduction | |
I've been thinking about what it would take to use the phpGACL permissions system in Tiki. This is what I've come up with. |
phpGACL Terminology | |
phpGACL uses the following objects to control permission (adapted from phpGACL homepage).
|
Areas Requiring DevelopmentĀ Work | |
There are six areas I can see that will work.
|
Initial Setup | |
This should be quite easy. phpGACL will have to be set-up with a default set of permissions during Tiki install. This is very similar to what Tiki already does during installation with its own permissions system ,and can be based on that. Probably a good learning exercise in how the phpGACL API works. |
Permissions Checks | |
Copy to clipboard
The rest of the parameters are pretty easy as well. The first two arewhat you are requesting permission for, which would be specific to the module/code path, and would probably be hardcoded. The last two are the specific object you are requesting the permission for, which would be part of the page request, and thus easily available. These parameters could also be hidden within a function, but there would have to be a separate function for each type of request. I don't know if that's worth it. I see all of that as pretty easy to do, replacing the currentCopy to clipboard
Yes, there are permission checks in Smarty |
User Synchronisation | |
This shouldn't be too difficult. ARO's will have to added to phpGACL for every new user. Removing a user should obviously remove the equivalent ARO. It should just require some additions to the code wherever we add or remove users. I'm assuming that's just in one or two places š I'm assuming here that the user will be added in a default Group, which makes this bit easier. |
Page Synchronisation | |
This shouldn't be too difficult, but will be more work than users. To allow for permissions on individual wiki pages, blogs, articles, forum threads, etc, an AXO will have to be added to phpGACL whenever a page, etc is created, and removed when it is deleted. This is analagous to the work for users, but will require changes accross more of the code. Another complication is which group to add new pages, etc to by default. |
User/Group Admin | |
Two (or more) new admin pages will (eventually?) be required to allow control of the users and groups, as the functionality is much epanded. The Users page should allow:
|
Page PermissionsĀ Admin | |
Make new permissions control pages for all those objects with individual permissions. These pages should allow the (authorised) user to:
|
Permissions Migration | |
Obviously, we will require a script to migrate the permissions in an existing Tiki into the new phpGACL system.
|
Conclusion | |
I think most of this would be fairly simple, but long winded. The big thing I don't have a handle on is how big a job the new user/group/page admin pages would be. The one big advantage we would have here is that phpGACL uses adodb and smarty, so we might be able to use a lot of the code from their admin UI.
|