Daisy documentation
 PreviousHomeNext 
4.9 Access ControlBook Index4.9.3 Evaluation of the ACL: how document permissions for someone are determined

4.9.2 Structure of the ACL

The structure of the ACL is illustrated by the diagram below.

Thus, the ACL consists of number of "document selections", for each of which a number of access rules (the Access Control Entries) can be defined. In case of the read and write permissions, Access Details can contain finer-grained permissions to allow partial read access and partial write access to the document.

In the Daisy API, the "document selection" is called the ACL object. This is the general term for a protected resource. The subject is an entity wanting to perform an operation on the object. The objects in our case are documents, selected using an expression. The subjects are users (persons or programs acting on their behalf).

The Daisy ACL is evaluated entirely from top to bottom, later rules overwriting the result of earlier rules. The order of the entries is hence important. The evaluation of the ACL is described in detail below.

4.9.2.1 Document selection

A document selection is defined by a Boolean expression, an expression evaluating to either true or false. During ACL evaluation, the document being evaluated will be checked against each of the expressions to see if it matches.

The expression uses the same syntax as in the where clause of the Daisy Query Language. However, the number of identifiers that are available is severely limited. More specifically, you can test on the following things:

Some examples of expressions:

InCollection('mycollection')

documentType = 'Navigation' and InCollection('mycollection')

$myfield = 'x' or $myotherfield = 'y'

For the evaluation of these expressions, the data of the fields in the last version is used, not the data from the live version.

4.9.2.2 Access Control Entry

An access control entry specifies that for a certain subject (a specific user or role, or everyone), what permissions the subject has on the document variant. The available permissions are:

In the access control entry, for each of these permissions you can specify that the user:

4.9.2.2.1 read permission

The read permission obviously gives users the ability to read a document.

When the read permission is granted, it can be further refined with a number of detail permissions:

The first two permissions are additive. If you have the first permission, it doesn't make a difference wether you have the second one or not.

4.9.2.2.2 write permission

The write permission gives users the ability to:

When the write permission is granted, it can be further refined with a number of detail permissions:

4.9.2.2.3 publish permission

The publish permission gives users the ability to change the publish/draft state of versions of documents. There is one detail permision:

4.9.2.2.4 delete permission

The delete permission gives users the ability to delete documents or document variants. This permission only applies to real deletes, not retirement (archival) of documents. In general, it is good practice to disable the delete permission, to avoid users deleting documents by accident.

4.9.2.3 Staging and Live ACL

In Daisy, there are two ACLs: a staging ACL and a live ACL. Only the staging ACL is directly editable. The only way to update the ACL is to first edit the staging ACL, and then put it live (= copy the staging ACL over the live ACL).

Before putting it live, it is possible to first test the staging ACL: you can give a document id, a role id and a user id and get the result of ACL evaluation in return, including an explanation of which ACL rules made the final decision.

In the Daisy Wiki front end, all these operations are available from the administration console. It is recommended that after editing the ACL, you first test it before putting it live, so that you are sure there are no syntax errors in the document selection expressions.

 PreviousHomeNext 
4.9 Access Control4.9.3 Evaluation of the ACL: how document permissions for someone are determined