Skip to content

WebDSL-AccessControl.sdf3

pdmosses/webdsl-statix/webdslstatix/syntax/WebDSL-AccessControl.sdf3

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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
module WebDSL-AccessControl

imports
  WebDSL-Action
  WebDSL-Core
  WebDSL-DataModel
  WebDSL-Lexical
  WebDSL-UI

context-free sorts

  // Optional sorts
  OptMatchArgs  

  // Access control sorts
    AccessControlPointcutElement
  AccessControlImportRulesArg  

syntax

  -CF.MatchNameWildCard = "*"
  -CF.MatchName = PageId-LEX OptWildCardArg-CF

context-free syntax

  Section.AccessControlDefinition = <
    access control rules <OptId>
      <AccessControlDefinition*>
  >
  Section.AccessControlDefinitionAlt = <
    access control rules { <OptId>
      <AccessControlDefinition*>
    }
  >

  Definition.Predicate = <
    predicate <Id> <OptFormalArgs> {
      <Exp>
    }
  >
  Definition.AccessControlPrincipalDef = <
    principal is <Id> with credentials <{Id ","}+>
  >

  .PredicateAc = <
    predicate <Id> <OptFormalArgs> {
      <Exp>
    }
  >
  .AccessControlPrincipalAcDef = <
    principal is <Id> with credentials <{Id ","}+>
  >
  .AccessControlPointcut = <
    pointcut <Id> ( <{FormalArg ","}*> ) {
      <{AccessControlPointcutElement ","}*>
    }
  >
  .Rule = AccessControlRule

  .AccessControlRule = <
    rule <AccessControlType> <MatchName> <OptMatchArgs> {
      <Exp> <AccessControlRule*>
    }
  >
  .SpecialAccessControlRule = <
    rule logsql {
      <Exp>
    }
  >

  AccessControlPointcutElement.AccessControlPointcutElement = <
    <AccessControlType> <MatchName> ( <{Id ","}*> <OptWildCardArg> )
  >

  Section.ACPolicy = <
    access control policy <PolicyExp>
  >
  .Name = Id
   = <( <PolicyExp> )> {bracket}
  .PolicyAnd = <<PolicyExp> AND <PolicyExp>>
  .PolicyOr = <<PolicyExp> OR <PolicyExp>>

  EntityBodyDeclaration.PredicateInEntity = <
    predicate <Id> <OptFormalArgs> {
      <Exp>
    }
  >

  Modifier.IgnoreAccessControl = <ignore-access-control>

  TemplateElement.AccessControlImportRules = <
    apply ac rules <Id> ( <{AccessControlImportRulesArg ","}*> )
  >

lexical syntax

  TemplateId = "rules" {reject}

context-free syntax

  AccessControlImportRulesArg.ACVar = Id

  OptMatchArgs.MatchArgs = <( <{FormalArg ","}*> <OptWildCardArg> )>
  OptMatchArgs.OptMatchArgsNone = <>

  .Id = Id
  .OptIdNone = <>

  .WildCardArg = <*>
  .OptWildCardArgNone = <>

context-free sorts

  

context-free syntax

  .ACTypePage          = <page>
  .ACTypeAction        = <action>
  .ACTypeTemplate      = <template>
  .ACTypeAjaxTemplate  = <ajaxtemplate>
  .ACTypePointcut      = <pointcut>

context-free priorities

  {left: PolicyExp.PolicyAnd} >
  {left: PolicyExp.PolicyOr}