-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspec_grammar.txt
More file actions
40 lines (28 loc) · 1.21 KB
/
spec_grammar.txt
File metadata and controls
40 lines (28 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<id>::= <string>
<string>::=<alphabet><string>
|<number><string>
|<number>
|<alphabet>
<alphabet>::=a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z
<number> ::= 0|1|2|3|4|5|6|7|8|9
<id_list>::= <id>|<id>,<id_list>
resource_def::= resource <id> ( <id_list> )
| resource <id>.( <id_list> )
| resource <id>= { <resource_ids> }
actor_def::= actor <id> { <actor_list> }
| actor <id> = { <actor_idlist> }
<actor_list>::= <id>:<value>;
| <id>:<value>;<actor_list>
policy_def::= policy <id>:<policy_def_body>
<policy_def_body>::= allow <id_list> access <resource_ids> ;
| allow <id_list> access <resource_ids> ; <policy_def_body>
| all <id>:actor . <id>.<field> = <id> -> allow <id> access <resource_ids> ;
| all <id> in <id>:actor . <id>.<field> = <id> -> allow <id> access <resource_id> ;
| exists <id> in <id>:actor . <id>.<field> = <id> -> !allow <id> access <resource_ids> ;
| exists <id> in <id>:actor . <id>.<field> = <id> -> allow <id> access <resource_id> ;
<resource_id>::= <id>.(<id_list>)
| <id>.<id>
| <id>
<resource_ids>::=
<resource_id>
| <resource_id>,<resource_ids>