Index: openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.adp,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.adp 25 Apr 2018 08:38:28 -0000 1.4
+++ openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.adp 3 Sep 2024 15:37:32 -0000 1.5
@@ -1,7 +1,11 @@
-
Who (grantee_id
) can do what (privilege
) on which object (object_id
).
The general permissions system has a flexible (and relatively +Permissions Overview
Who (grantee_id
) can do what (privilege
) on which object (object_id
).
The general permission system has a flexible (and relatively complex) data model in OpenACS. Developers who have not had the time to learn the internals of the data model may end up writing seemingly correct code that crashes their system in weird ways. This writeup is the result of my running into such a piece of code and trying to understand exactly what went wrong. It is geared -towards developers who understand the general permissions system to +towards developers who understand the general permission system to the extent that is described in the Groups, Context, Permissions documentation, but who have not had the opportunity to take a long, careful look at the system internals.
In OpenACS, most of the interesting tables are expected to
@@ -54,7 +58,7 @@
OpenACS object system needs to have an entry in the acs_objects
. This allows developers to
define relationships between any two entities A and B by defining a relationship between
their corresponding entries in the acs_objects
table. One of the applications
-of this powerful capability is the general permissions system.
At the heart of the permission system are two tables: +of this powerful capability is the general permission system.
At the heart of the permission system are two tables:
acs_privileges
and acs_permissions
.
create table acs_privileges ( privilege varchar2(100) not null @@ -112,7 +116,7 @@Although quite feasible, this approach fails to take advantage of the fact that objects in the system are commonly organized -hierarchally, and permissions usually follow the hierarchical +hierarchically, and permissions usually follow the hierarchical structure, so that if user X has the read privilege on object A, she typically also @@ -127,7 +131,7 @@ Context Hierarchy
Suppose objects A, B, ..., and F form the following hierarchy.
This can be represented in the acs_objects table by the following entries:
-Table 11.3. acs_objects example +
Table 11.3. acs_objects example data
@@ -383,7 +387,7 @@ context hierarchy. Now for the third hierarchy playing a prominent role in the permission system. The party data model is set up as follows.
@@ -487,7 +491,7 @@ Read
acs_rels
: right-side is -a subset of left-side, ieobject2
is a part ofobject1
.Another way of building up groups is by adding subgroups. +a subset of left-side, i.e.
object2
is a part ofobject1
.Another way of building up groups is by adding subgroups. Suppose we define Merry Pranksters and Sad Pranksters as subgroups of Pranksters. We say that the Pranksters group is composed of groups Merry Pranksters and Sad Pranksters. This information is