Skip to content

Commit 71d45b8

Browse files
committed
update schema and bnf
1 parent 2f7434a commit 71d45b8

5 files changed

Lines changed: 80 additions & 614 deletions

File tree

documentation/IDTA-01004/modules/ROOT/partials/bnf/access-rule-model.bnf

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,14 @@
1212
( <SingleObject> <ws> )*
1313
( <UseObjectGroup> <ws> )*
1414
( ( "FORMULA:" <ws> <Condition> ) | ("USEFORMULA" <ws> <StringLiteral>) <ws> ) <ws>
15-
( "FRAGMENT:" <ws> <FieldIdentifierFragment> <ws> ( ( "FILTER:" <ws> <Condition> ) | ("USEFILTER" <ws> <StringLiteral>) <ws> ) <ws> )?
15+
( <Filter> <ws> )?
1616
( <FilterList> <ws> )?
17+
18+
<Filter> ::=
19+
"FILTER:" <ws> ( <SecurityQueryFilter> <ws> )
20+
21+
<FilterList> ::=
22+
"FILTERLIST:" <ws> ( <SecurityQueryFilter> <ws> )*
23+
24+
<SecurityQueryFilter> ::=
25+
"FRAGMENT:" <ws> <FieldIdentifierFragment> <ws> ( ( "CONDITION:" <ws> <Condition> ) | ("USEFORMULA" <ws> <StringLiteral>) <ws> ) <ws>

documentation/IDTA-01004/modules/ROOT/partials/bnf/access-rules.bnf

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,17 @@
1212
( <SingleObject> <ws> )*
1313
( <UseObjectGroup> <ws> )*
1414
( ( "FORMULA:" <ws> <Condition> ) | ("USEFORMULA" <ws> <StringLiteral>) <ws> ) <ws>
15-
( "FRAGMENT:" <ws> <FieldIdentifierFragment> <ws> ( ( "FILTER:" <ws> <Condition> ) | ("USEFILTER" <ws> <StringLiteral>) <ws> ) <ws> )?
15+
( <Filter> <ws> )?
1616
( <FilterList> <ws> )?
1717

18+
<Filter> ::=
19+
"FILTER:" <ws> ( <SecurityQueryFilter> <ws> )
20+
1821
<FilterList> ::=
19-
"FILTERLIST:" <ws> ( <SecurityQueryFilter> <ws> )+
22+
"FILTERLIST:" <ws> ( <SecurityQueryFilter> <ws> )*
2023

2124
<SecurityQueryFilter> ::=
22-
"FRAGMENT:" <ws> <FieldIdentifierFragment> <ws> ( ( "FILTER:" <ws> <Condition> ) | ("USEFILTER" <ws> <StringLiteral>) <ws> ) <ws>
25+
"FRAGMENT:" <ws> <FieldIdentifierFragment> <ws> ( ( "CONDITION:" <ws> <Condition> ) | ("USEFORMULA" <ws> <StringLiteral>) <ws> ) <ws>
2326

2427
<ACL> ::=
2528
"ATTRIBUTES:" <ws>
@@ -32,7 +35,7 @@
3235
"USEACL" <ws> <StringLiteral> <ws>
3336

3437
<Right> ::=
35-
"CREATE" | "READ" | "UPDATE" | "DELETE" | "EXECUTE" | "VIEW" | "ALL"
38+
"CREATE" | "READ" | "UPDATE" | "DELETE" | "EXECUTE" | "VIEW" | "ALL" | "TREE"
3639

3740
<Access> ::=
3841
"ALLOW" | "DISABLED"
@@ -82,8 +85,8 @@
8285
"USEOBJECTS" <ws> <StringLiteral> <ws>
8386

8487
<Condition> ::= <logicalExpression> <ws>
85-
86-
<logicalExpression> ::= <logicalNestedExpression> | <logicalOrExpression> | <logicalAndExpression> |
88+
89+
<logicalExpression> ::= <logicalNestedExpression> | <logicalOrExpression> | <logicalAndExpression> |
8790
<logicalNotExpression> | <matchExpression> | <BoolLiteral> | <castToBool> | <singleComparison>
8891
<logicalNestedExpression> ::= "(" <ws> <logicalExpression> ")" <ws>
8992
<logicalOrExpression> ::= "$or" <ws> "(" <ws> <logicalExpression> ( "," <ws> <logicalExpression> )+ ")" <ws>
@@ -165,7 +168,7 @@
165168

166169
<castToTime> ::=
167170
"time" <ws> "(" <ws> ( <stringOperand> | <dateTimeOperand> ) <ws> ")" <ws>
168-
171+
169172
<DateTimeLiteral> ::= <datetime> <ws>
170173
<TimeLiteral> ::= <time> <ws>
171174
<datetime> ::= <date> <ws> ( "T" | " " ) <ws> <time> <ws> ( <timezone> <ws> )?

documentation/IDTA-01004/modules/ROOT/partials/examples/filter.bnf

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,20 @@ ACCESSRULE:
1818
$aasdesc#specificAssetIds[].value $eq "ACME001"
1919
)
2020
)
21-
FRAGMENT: $aasdesc#specificAssetIds[]
2221
FILTER:
23-
$or(
24-
$match(
25-
$aasdesc#specificAssetIds[].name $eq "manufacturerPartId",
26-
$aasdesc#specificAssetIds[].value $eq "99991"
27-
),
28-
$match(
29-
$aasdesc#specificAssetIds[].name $eq "customerPartId",
30-
$aasdesc#specificAssetIds[].value $eq "ACME001"
31-
),
32-
$aasdesc#specificAssetIds[].name $eq "partInstanceId",
33-
$aasdesc#specificAssetIds[].externalSubjectId $eq CLAIM("BusinessPartnerNumber"),
34-
$aasdesc#specificAssetIds[].externalSubjectId $eq "PUBLIC_READABLE"
35-
)
22+
FRAGMENT: $aasdesc#specificAssetIds[]
23+
CONDITION:
24+
$or(
25+
$match(
26+
$aasdesc#specificAssetIds[].name $eq "manufacturerPartId",
27+
$aasdesc#specificAssetIds[].value $eq "99991"
28+
),
29+
$match(
30+
$aasdesc#specificAssetIds[].name $eq "customerPartId",
31+
$aasdesc#specificAssetIds[].value $eq "ACME001"
32+
),
33+
$aasdesc#specificAssetIds[].name $eq "partInstanceId",
34+
$aasdesc#specificAssetIds[].externalSubjectId $eq CLAIM("BusinessPartnerNumber"),
35+
$aasdesc#specificAssetIds[].externalSubjectId $eq "PUBLIC_READABLE"
36+
)
3637

documentation/IDTA-01004/modules/ROOT/partials/json/aas-queries-and-access-rules-schema.json

Lines changed: 5 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -654,19 +654,12 @@
654654
"USEFORMULA": {
655655
"type": "string"
656656
},
657-
"FRAGMENT": {
658-
"$ref": "#/definitions/fieldIdentifierFragment"
659-
},
660657
"FILTER": {
661-
"$ref": "#/definitions/logicalExpression",
658+
"$ref": "#/definitions/SecurityQueryFilter",
662659
"additionalProperties": false
663660
},
664-
"USEFILTER": {
665-
"type": "string"
666-
},
667661
"FILTERLIST": {
668662
"type": "array",
669-
"minItems": 1,
670663
"items": {
671664
"$ref": "#/definitions/SecurityQueryFilter"
672665
}
@@ -714,43 +707,6 @@
714707
]
715708
}
716709
]
717-
},
718-
{
719-
"oneOf": [
720-
{
721-
"required": [
722-
"FRAGMENT",
723-
"FILTER"
724-
]
725-
},
726-
{
727-
"required": [
728-
"FRAGMENT",
729-
"USEFILTER"
730-
]
731-
},
732-
{
733-
"not": {
734-
"anyOf": [
735-
{
736-
"required": [
737-
"FRAGMENT"
738-
]
739-
},
740-
{
741-
"required": [
742-
"FILTER"
743-
]
744-
},
745-
{
746-
"required": [
747-
"USEFILTER"
748-
]
749-
}
750-
]
751-
}
752-
}
753-
]
754710
}
755711
],
756712
"additionalProperties": false
@@ -761,10 +717,10 @@
761717
"FRAGMENT": {
762718
"$ref": "#/definitions/fieldIdentifierFragment"
763719
},
764-
"FILTER": {
720+
"CONDITION": {
765721
"$ref": "#/definitions/logicalExpression"
766722
},
767-
"USEFILTER": {
723+
"USEFORMULA": {
768724
"type": "string"
769725
}
770726
},
@@ -774,12 +730,12 @@
774730
"oneOf": [
775731
{
776732
"required": [
777-
"FILTER"
733+
"CONDITION"
778734
]
779735
},
780736
{
781737
"required": [
782-
"USEFILTER"
738+
"USEFORMULA"
783739
]
784740
}
785741
],

0 commit comments

Comments
 (0)