Differences from version 4 to 8



@@ -1,38 +1,64 @@

-!Current Tables
-__Users_Permissions__
-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 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.
+__WARNING__ - THIS PAGE IS NOT YET READY, STILL WORKING ON THE DESIGN ASPECTS
 
-In order to not make it necessary to lookup the id while for user view and for how its accessed from php pages its all done by name, it might be good to add php configuration file for each package that is written (and updated) whenever permissions are added. Then php function will convert from real name to numerical id without requirying database access.
+!Current Problems
+__users_permissions__
+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
 
-__Users_Objectpermissions__
+__users_objectpermissions__
 This table needs to be replaced to allow permissions control on per-content (rather then per object) and per group
 
-!New Permission/Access Tables
+!Relevent Tables with Some Schema Changes
 
 __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_id=== - integer - Numerical ID of the permission, assigned when package is added
+===perm_name=== - varchar - 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.
+===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 "tikipro.org", but for custom permissions the value would be something else
+===maintainer_url=== - varchar - This is used to point to whoever supports use of this permission. Normally this would be "bitweaver.org", but for custom permissions the value would be something else
 
-__tiki_access__ (primary key is access_id):
+__users_groups__ (primary key is group_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
+This table holds information about each group
+
+===group_id=== - ingeger - Numeric id of the group
+===user_id=== - integer - This is an id of the user that added the group and can change it
+===is_default=== varchar(1) - not 100% sure but it seems to be a pointer to which group new users are added to. NOTE: If this is so, it has no place in users_group table as you might expect only one group to have this property, the actual default group_id should instead be entered in some general bitweaver config table like tiki_defaults.
+===group_name=== - varchar - This is the actual name of the group as seen by end-users
+===group_desc=== - varchar - Longer description of what kind of users are going to be in the group
+===access_question=== - varchar - Additional question to ask before granting user access as member of this group
+===access_answer=== - varchar - Expected answer to access question (i.e. password). Note that it might be good idea to have this be MD5 hash of actual answer
+
+__users_group_permissions___ (primary key is combination of group_id and perm_id)
+
+This table has information on what kind of permissions does a group member has by default
+
+===group_id=== - integer - Which user
+===perm_id=== - integer - Which permission
+===value=== - varchar(1) - Unsure what this is for....
 
 __tiki_access_permissions__
-Access is a grouping of one or more permissions as it applies to the content.
 
+This table has information about each specific access type. Access is a grouping of one or more permissions as it applies to the content that certain group can use
+
+===perm_id=== - integer - what permission is in this access
+===group_id=== - integer -
+===content_id=== - integer -
+
+!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_content" 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
+
+---
+
+Statements to be supported:
 
-!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. Normally this would be standard permission (like tiki_p_view) but it might be disabled for some content.
+GROUP A has default View access on ALL Tiki Pages
+GROUP B has View access on Tiki Page2 but not on Tiki Page 3
+GROUP C has View and Search Access for Tiki Page2 and View only access on Tiki Page3 and password-protected View Access on Tiki Page 4
Page History
Date/CommentUserIPVersion
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