Version 5


Thoughts on TikiPro Database Permissions and Content Access Control

Created by: William Leibzon, Last modification: 29 Jan 2005 (22:00 UTC) by William Leibzon

Current Tables

The table's primary key is permissoin name itself which is often long text. Having primary key that is often referenced to be non-numerical value is considered a bad design and slows database access as well as increases size of database tables and indices. So it is best to untroduce new numerical id for each permission.

In order to not make it necessary to lookup the id for each access to page and for use of the permission name in php pages (where its all done by name), it might be good to add php id and configurations file for each package that can be updated whenever permissions are added. Then php function will convert from real name to numerical id without requirying database access based on that configuration file.

Also it might be good idea to rename this table from user_permissions to tiki_permissions as in reality it represents tiki-specific information and not user-specific data

This table needs to be replaced to allow permissions control on per-content (rather then per object) and per group

New Permission/Access Tables

tiki_permissions (primary key is perm_id, unique constraint on perm_name):

This table is used to hold information about each permission

perm_id - Numerical ID of the permission, assigned when package is added
perm_name - integer - Actual name of the permission
perm_desc - varchar - Full description
level= - varchar - This is might have been better if it was called "permission type". It specifies appropriate control level needed to use this permission, typical values are "admin", "editors", "basic". This closely corresponds to what group is typically this permission assigned to.
package - varchar - Name of the package which uses this permission
maintainer_url - varchar - This is used to point to whoever supports use of this permission. Normally this would be "", but for custom permissions the value would be something else

NOTE - Remove tiki_access, password should be part of the users_group, it represents what is neccessary before user can be considered part of this group

tiki_access (primary key is access_id):

This table has information about each specific access mode. Access specifies what is required to be able to use certain restriction, typically this is used for password-protection.
access_id - integer - Unique numerical id
access_desc - varchar - Description of the access
access_question - varchar - Question to ask before granting this type of access
access_answer - varchar - Expected answer (i.e. password). Note that it might be good idea to have this be MD5 hash of actual answer

Access is a grouping of one or more permissions as it applies to the content.

Thoughts regarding "hidden" access.

Its been thought that it would be good idea to have special way to designate some page as hidden so that it does not show up on pages and that should be property of the access_type (is_hidden tag in access table). After thingking about it more, I believe this actually more closely corresponds to permission. In fact the permission should be "tiki_p_searchable" and represents that given user/group can in fact do searches for particular object and view it as part of the list of objects of its type. Normally this would be standard permission that is enabled (like tiki_p_view) but it might be disabled for some content or for some groups of users.
Page History
29 Jan 2005 (23:42 UTC)
William Leibzon216.151.194.2268
Current • Source
William Leibzon216.151.194.2267
View • Compare • Difference • Source
William Leibzon216.151.194.2266
View • Compare • Difference • Source
William Leibzon216.151.194.2265
View • Compare • Difference • Source
William Leibzon216.151.194.2264
View • Compare • Difference • Source
William Leibzon216.151.194.2263
View • Compare • Difference • Source
William Leibzon216.151.194.2262
View • Compare • Difference • Source