You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This removes the entire access rule for that role on that entity.
114
+
A full `REVOKE` (without rights list) removes the entire access rule. A partial `REVOKE` downgrades specific rights: `REVOKE READ (x)` sets member x to no access, `REVOKE WRITE (x)` downgrades from ReadWrite to ReadOnly.
Copy file name to clipboardExpand all lines: docs-site/src/language/grant-revoke.md
+23-2Lines changed: 23 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,8 @@ Where `<rights>` is a comma-separated list of:
21
21
|`WRITE *`| Write all members |
22
22
|`WRITE (<attr>, ...)`| Write specific members only |
23
23
24
+
GRANT is **additive**: if the role already has an access rule on the entity, new rights are merged in. Existing permissions are never removed by a GRANT — only upgraded.
25
+
24
26
Examples:
25
27
26
28
```sql
@@ -36,20 +38,39 @@ GRANT Shop.User ON Shop.Customer (READ (Name, Email), WRITE (Email));
36
38
-- With XPath constraint (doubled single quotes for string literals)
37
39
GRANTShop.UserONShop.Order (READ *, WRITE *)
38
40
WHERE'[Status = ''Open'']';
41
+
42
+
-- Additive: adds Notes to existing read access without removing Name, Email
43
+
GRANTShop.UserONShop.Customer (READ (Notes));
39
44
```
40
45
41
46
### REVOKE
42
47
43
-
Remove an entity access rule entirely:
48
+
Remove an entity access rule entirely, or revoke specific rights:
For partial revoke, `REVOKE READ (x)` sets member x access to None. `REVOKE WRITE (x)` downgrades member x from ReadWrite to ReadOnly. `REVOKE CREATE` / `REVOKE DELETE` removes the structural permission.
Copy file name to clipboardExpand all lines: docs-site/src/reference/security/grant.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ Grants access rights to module roles. There are four forms of the GRANT statemen
22
22
23
23
### Entity Access
24
24
25
-
The entity access form creates an access rule on an entity for a given module role. The rule specifies which CRUD operations are permitted and optionally restricts visibility with an XPath constraint.
25
+
The entity access form creates or updates an access rule on an entity for a given module role. **GRANT is additive**: if the role already has an access rule on the entity, the new rights are merged with existing ones. Existing permissions are never downgraded by a GRANT.
26
26
27
27
Entity access rules control:
28
28
-**CREATE** -- whether the role can create new instances
@@ -117,6 +117,14 @@ Grant nanoflow execution:
117
117
GRANT EXECUTE ON NANOFLOW Shop.NAV_ValidateInput TO Shop.User;
118
118
```
119
119
120
+
Additive grant -- add new attribute access without removing existing:
121
+
122
+
```sql
123
+
-- Viewer already has READ (Name, Email)
124
+
GRANTShop.ViewerONShop.Customer (READ (Phone));
125
+
-- Result: READ (Name, Email, Phone)
126
+
```
127
+
120
128
## See Also
121
129
122
130
[REVOKE](revoke.md), [CREATE MODULE ROLE](create-module-role.md), [CREATE USER ROLE](create-user-role.md)
Copy file name to clipboardExpand all lines: docs-site/src/reference/security/revoke.md
+36-4Lines changed: 36 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,12 @@
3
3
## Synopsis
4
4
5
5
```sql
6
-
-- Entity access
6
+
-- Entity access (full -- removes entire rule)
7
7
REVOKEmodule.RoleONmodule.Entity
8
8
9
+
-- Entity access (partial -- downgrades specific rights)
10
+
REVOKEmodule.RoleONmodule.Entity ( rights )
11
+
9
12
-- Microflow access
10
13
REVOKE EXECUTE ON MICROFLOW module.NameFROMmodule.Role [, ...]
11
14
@@ -22,7 +25,9 @@ Removes previously granted access rights from module roles. Each form is the cou
22
25
23
26
### Entity Access
24
27
25
-
Removes the entire entity access rule for the specified module role on the entity. Unlike GRANT, there is no way to partially revoke (e.g., remove only WRITE while keeping READ). The entire rule is removed.
28
+
Without a rights list, removes the entire entity access rule for the specified module role on the entity.
29
+
30
+
With a rights list, performs a **partial revoke**: `REVOKE READ (x)` sets member x to no access. `REVOKE WRITE (x)` downgrades member x from ReadWrite to ReadOnly. `REVOKE CREATE` and `REVOKE DELETE` remove the structural permission. The access rule itself is preserved.
26
31
27
32
### Microflow Access
28
33
@@ -42,7 +47,16 @@ Removes execute permission on a nanoflow from one or more module roles.
42
47
: The module role losing access. Must be a qualified name (`Module.RoleName`).
43
48
44
49
`module.Entity`
45
-
: The entity whose access rule is removed.
50
+
: The entity whose access rule is removed or modified.
51
+
52
+
`rights`
53
+
: Optional. A comma-separated list of rights to revoke (partial revoke). Same syntax as GRANT rights:
54
+
- `CREATE` -- revoke create permission
55
+
- `DELETE` -- revoke delete permission
56
+
- `READ *` -- revoke all read access
57
+
- `READ (Attr1, ...)` -- revoke read on specific attributes
58
+
- `WRITE *` -- downgrade all members from ReadWrite to ReadOnly
59
+
- `WRITE (Attr1, ...)` -- downgrade specific attributes from ReadWrite to ReadOnly
46
60
47
61
`module.Name`
48
62
: The target microflow, nanoflow, or page.
@@ -52,12 +66,30 @@ Removes execute permission on a nanoflow from one or more module roles.
52
66
53
67
## Examples
54
68
55
-
Remove entity access for a role:
69
+
Remove all entity access for a role:
56
70
57
71
```sql
58
72
REVOKEShop.ViewerONShop.Customer;
59
73
```
60
74
75
+
Partial revoke -- remove read access on a specific attribute:
Copy file name to clipboardExpand all lines: docs/05-mdl-specification/01-language-reference.md
+23-2Lines changed: 23 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1004,7 +1004,7 @@ REVOKE VIEW ON PAGE <module>.<name> FROM <module>.<role> [, ...]
1004
1004
1005
1005
### GRANT (Entity Access)
1006
1006
1007
-
Creates an access rule on an entity for one or more module roles with CRUD permissions.
1007
+
Creates or updates an access rule on an entity for one or more module roles with CRUD permissions. **GRANT is additive** — if the role already has an access rule, new rights are merged without removing existing permissions.
1008
1008
1009
1009
**Syntax:**
1010
1010
```sql
@@ -1030,15 +1030,36 @@ GRANT Shop.User ON Shop.Customer (READ (Name, Email), WRITE (Email));
Partial revoke semantics: `REVOKE READ (x)` sets member x to no access. `REVOKE WRITE (x)` downgrades from ReadWrite to ReadOnly. `REVOKE CREATE` / `REVOKE DELETE` removes the structural permission.
0 commit comments