Skip to content

Commit

Permalink
Simplify representation of privileges in access control entries by al…
Browse files Browse the repository at this point in the history
…ways using an array.
  • Loading branch information
agudian committed Apr 25, 2018
1 parent bcd88dd commit 877b44e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 18 deletions.
2 changes: 1 addition & 1 deletion schemas/external/repo/accesscontrolentry.example.1.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"repo:principal": "authenticated",
"repo:privilege": "read",
"repo:privileges": ["read"],
"repo:modifier": "grant"
}
2 changes: 1 addition & 1 deletion schemas/external/repo/accesscontrolentry.example.2.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"@id": "C0B648DE57D701277F000101@AdobeID",
"@type": "https://ns.adobe.com/adobecloudplatform/ims/user"
},
"repo:privilege": ["write", "delete"],
"repo:privileges": ["write", "delete"],
"repo:modifier": "grant"
}
21 changes: 7 additions & 14 deletions schemas/external/repo/accesscontrolentry.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,12 @@
}
]
},
"repo:privilege": {
"description": "Privilege granted or denied to the Principal",
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/privilege"
}
},
{
"$ref": "#/definitions/privilege"
}
]
"repo:privileges": {
"description": "Privileges granted or denied to the Principal",
"type": "array",
"items": {
"$ref": "#/definitions/privilege"
}
},
"repo:relations": {
"description":
Expand All @@ -74,7 +67,7 @@
"default": "grant"
}
},
"required": ["repo:principal", "repo:privilege"],
"required": ["repo:principal", "repo:privileges"],
"additionalProperties": {
"type": ["object", "array", "string"]
}
Expand Down
4 changes: 2 additions & 2 deletions schemas/external/repo/accesscontrolpolicy.example.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"repo:acl": [
{
"repo:principal": "authenticated",
"repo:privilege": "read",
"repo:privileges": ["read"],
"repo:modifier": "grant"
},
{
Expand All @@ -13,7 +13,7 @@
"@id": "C0B648DE57D701277F000101@AdobeID",
"@type": "https://ns.adobe.com/adobecloudplatform/ims/user"
},
"repo:privilege": ["write", "delete"],
"repo:privileges": ["write", "delete"],
"repo:modifier": "grant"
}
]
Expand Down

0 comments on commit 877b44e

Please sign in to comment.