[consulting] is ACL /CRUD based on multiple values with a AND clause possible?

vincew vincew at eurinsol.eu
Thu Feb 3 09:35:27 UTC 2011


LS,

I'm preparing a next drupal project and I'm having some requirements
regarding ACL/CRUD. I'll elaborate what I would like to achieve with a
small use-case. I've taken this use-case into the realm of education,
but it's also applicable on several other realms (business for instance
with organisation/proces groups).

(btw: I've created a support request for in the OG module queue at
jan-20, but there wasn't a reaction. Perhaps it wasn't the correct
place, so I give it a try here. The support request can be found at:
http://drupal.org/node/1033584



There is a contenttype called: Evaluation. An evaluation has 2 fields:
- Location
- Course

Users of the system can have different roles:
- administration
- teacher
- student

Users can be related to zero or more Locations and Courses

What I would like to have is ACL/CRUD based on the relationship of the
fields. For instance in a way that a post of an Evaluation with the
fields: 
- Amsterdam 
- Math

can be CRUD only by users related to both of the field values AND who
have the correct permission to do so.

so
- a user in the role of administration for Amsterdam/Math can Create an
Evaluation for Amsterdam/Math
- a user student for Amsterdam/Math can Read an Evaluation
- a teacher for Amsterdam/Math can Edit an Evaluation

- a teacher for Amsterdam/Math can view all Evaluations of Amsterdam
AND/OR all Evaluations for Math

but:
- a student for Berlin/Math or Amsterdam/Music can't view the evaluation


What I would like to know is:

     1. Can this be done with OG?
     2. If not, is there an existing sub module for this concept?
     3. If it can be done with OG, can anyone point me in the direction
        of setting this up? (any OG (submodule) settings and/or
        og_access_hooks or so)
     4. Should I define my own content_type_course module where I can
        specify the CRUD access rules and are there any caveats to this

Tnx for reading (and answering) this.

Best,
VinceW

-- 

--------------------------------
European Information Solutions
--------------------------------

T       : +31 412 474015
F       : +31 412 475194
M       : +31 630 115252
Email   : info at eurinsol.eu
Website : http://www.eurinsol.eu

--------------------------------
Your Information Matters
-------------------------------- 






More information about the consulting mailing list