Index: openacs-4/packages/acs-core-docs/www/permissions-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/permissions-design.html,v diff -u -N -r1.21.2.1 -r1.21.2.2 --- openacs-4/packages/acs-core-docs/www/permissions-design.html 5 Jul 2004 19:47:31 -0000 1.21.2.1 +++ openacs-4/packages/acs-core-docs/www/permissions-design.html 1 Nov 2004 23:40:06 -0000 1.21.2.2 @@ -1,10 +1,10 @@ -Permissions Design

Permissions Design

By John Prevost and Rafael H. Schloming

+Permissions Design

Permissions Design

By John Prevost and Rafael H. Schloming

OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

Essentials

Essentials

Introduction

The goal of the Permissions system is to provide generic means to both +

Introduction

The goal of the Permissions system is to provide generic means to both programmers and site administrators to designate operations (methods) as requiring permissions, and then to check, grant, or revoke permissions via a consistent interface. For example, we might decide that the transaction that @@ -21,7 +21,7 @@ those package objects on which a user has certain permissions.

For site administrators and other authorized users, the Permissions UI provides a means to aggregate the primitive operations (methods) made available by the programmer into logical privileges (like read, write, and -admin) that can be granted and revoked.

Historical Considerations

In earlier versions of the OpenACS, permissions and access control was handled +admin) that can be granted and revoked.

Historical Considerations

In earlier versions of the OpenACS, permissions and access control was handled on a module-by-module basis, often even on a page-by-page basis. For example, a typical module might allow any registered user to access its pages read-only, but only allow members of a certain group to make changes. The way @@ -32,13 +32,13 @@ control were many, the two major ones being inconsistency, and repeated/redundant code. Thus the drive in OpenACS 4 to provide a unified, consistent permissions system that both programmers and administrators can -readily use.

Competitive Analysis

None available as of 10/2000.

Design Tradeoffs

The core of the permissions data model is quite simple. Unfortunately, the +readily use.

Competitive Analysis

None available as of 10/2000.

Design Tradeoffs

The core of the permissions data model is quite simple. Unfortunately, the hierarchical nature of default permissions entails quite a number of tree queries which could slow the system down. Since every page will have at least one permissions check, a number of views and auxiliary tables (de-normalizations of the data model) have been created to speed up access queries. As a consequence, speed of updates are decreased and requirements -for additional storage space increase.

Data Model Discussion

As described in section V., the core of the permissions data model is +for additional storage space increase.

Data Model Discussion

As described in section V., the core of the permissions data model is simple, though a number of views and auxiliary tables exist to ensure adequate performance. The core model consists of five tables:

acs_methods @@ -92,7 +92,7 @@ have taken methods from (at any level) (see acs_privilege_hierarchy)

  • objects get access control from direct grants, or inherit permissions from their context (unless the "don't inherit" flag is -set)

  • Legal Transactions

    There are three essential areas in which all transactions in the +set)

    Legal Transactions

    There are three essential areas in which all transactions in the permissions system fall:

    • Modification of methods and privileges

    • Modification of permissions

    • Queries on permissions

    "Modification of methods and privileges." This refers to actions that happen mainly at package installation time - a package will create a number of methods for its own use, then associate them with the @@ -124,7 +124,7 @@ against acs_object_party_method_map, or by calling the Tcl functions for appropriate methods.

    Finally, when administering the permissions for an object, a web page needs to know all permissions directly granted on that object. This is done -by querying against acs_permissions.

    API

    The API to the permissions system consists of a few well-known tables, +by querying against acs_permissions.

    API

    The API to the permissions system consists of a few well-known tables, plus a pair of PL/SQL procedures and a pair of Tcl functions.

    Tables

    acs_methods, acs_privileges, and acs_privilege_method_rules manage the set of permissions in the system. At installation time, a package will add to these three tables to @@ -159,7 +159,7 @@

    If the user_id argument is left out, then the currently logged in user is checked. To create an error page, Tcl code should call:

     ad_require_permission $object_id $object_type $method
    -

    These procedures are defined in acs-permissions-procs.tcl.

    User Interface

    All users of the permissions system are the same at the user-interface +

    These procedures are defined in acs-permissions-procs.tcl.

    User Interface

    All users of the permissions system are the same at the user-interface level. If you have the administer_privileges method permission on an object, then you may edit privileges for that object with the UI.

    The UI currently provides a list of all granted permissions on the object. If the user wishes to revoke privileges, she may select a set of grants, @@ -171,15 +171,15 @@ one object" screen.

    If it makes sense, the system will also display a checkbox which the user may select to toggle whether permissions are inherited from the object's context.

    There are a number of potential future enhancements for the permissions -UI, outlined below.

    Configuration/Parameters

    There are no configuration options for the permissions system.

    Future Improvements/Areas of Likely Change

    The most important future changes to the Permissions system are likely to +UI, outlined below.

    Configuration/Parameters

    There are no configuration options for the permissions system.

    Future Improvements/Areas of Likely Change

    The most important future changes to the Permissions system are likely to be in the UI:

    • There should be a page displaying a list of all objects for which the current user is allowed to administer privileges.

    • Users should be able to view the permissions on any object, or perhaps on objects which they have the "read_permissions" method. This would allow them to see what grants are affecting their objects through -inheritance.

    Authors

    System creator +inheritance.

    Authors

    System creator

    Rafael H. Schloming

    System owner

    Rafael H. Schloming

    Documentation author -

    John Prevost

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.1Creation9/11/2000John Prevost
    0.2Edited for ACS 4 Beta release10/04/2000Kai Wu
    View comments on this page at openacs.org
    +

    John Prevost

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.1Creation9/11/2000John Prevost
    0.2Edited for ACS 4 Beta release10/04/2000Kai Wu
    View comments on this page at openacs.org