Changes between Version 6 and Version 7 of S3/S3AAA/OrgAuth
- Timestamp:
- 01/06/12 12:19:31 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
S3/S3AAA/OrgAuth
v6 v7 29 29 In OrgAuth, any applicable ACL is automatically restricted to the records of those organisations (policy 6) or organisations+facilities (policy 7) for which the user has the respective access roles. This applies to both, user-ACLs (uacl) and owner-ACLs (oacl). 30 30 31 It is possible to override this restriction in the ACL itself, and explicitly define for which organisation/facility the ACL shall apply (see [ DelegationsofPermissions Delegations of Permissions]), or to define that the ACL shall apply for the records of ''all'' organisations/facilities (see [#GeneralDelegationsofPermissions General Delegations of Permissions]).31 It is possible to override this restriction in the ACL itself, and explicitly define for which organisation/facility the ACL shall apply (see [#DelegationsofPermissions Delegations of Permissions]), or to define that the ACL shall apply for the records of ''all'' organisations/facilities (see [#GeneralDelegationsofPermissions General Delegations of Permissions]). 32 32 33 33 == Delegations of Permissions == … … 41 41 {{{ 42 42 # Get the access role from the organisation record 43 org_record = db(db.org_organisation.id == my_org_id).select(db.org_organisation.owned_by_ role,43 org_record = db(db.org_organisation.id == my_org_id).select(db.org_organisation.owned_by_organisation, 44 44 limitby=(0, 1)).first() 45 45 46 46 # Delegate read permission for this organisation's inv_inv_item record to all authenticated users 47 47 update_acls(authenticated, 48 dict(t="inv_inv_item", uacl=acl.READ, organisation=org_record.owned_by_ role))48 dict(t="inv_inv_item", uacl=acl.READ, organisation=org_record.owned_by_organisation)) 49 49 }}} 50 50 … … 53 53 {{{ 54 54 # Get the access role for this organisation 55 this_org = db(db.org_organisation.id == my_org_id).select(db.org_organisation.owned_by_ role,55 this_org = db(db.org_organisation.id == my_org_id).select(db.org_organisation.owned_by_organisation, 56 56 limitby=(0, 1)).first() 57 57 58 58 # Get the access role for the other organisation 59 other_org = db(db.org_organisation.id == other_org_id).select(db.org_organisation.owned_by_ role,59 other_org = db(db.org_organisation.id == other_org_id).select(db.org_organisation.owned_by_organisation, 60 60 limitby=(0, 1)).first() 61 61 62 62 # Delegate read permission for this organisation's inv_inv_item record to all authenticated users 63 63 update_acls(other_org.owned_by_role, 64 dict(t="inv_inv_item", uacl=acl.READ, organisation=this_org.owned_by_ role))64 dict(t="inv_inv_item", uacl=acl.READ, organisation=this_org.owned_by_organisation)) 65 65 }}} 66 66