kw policy
Reserved keyword
The list of words: §1.4
Syntax
Policy = "policy" Ident "{" { Rule } "}" ;Grammar: App. A
Defined in
- 13.4 Authorisation and policies — The subject of a policy
- 14.2 Dynamic configuration — dynamic Name { …
- 1.4 Keywords — Reserved (cannot be used as names)
Examples
policy Orders {
allow get(id) if caller.isUser(db.find(Order, id)?.userId)
allow list, recent if caller.has(role: .Support)
allow * if caller.service("billing")
deny delete unless caller.has(role: .Admin) && caller is .User(mfa: true, ..)
}
@public rpc health() -> Ok
@allow(role: .Admin) rpc purge() -> Ok
@internal rpc create(…) -> Order— 13.4 Authorisation and policies
Related diagnostics
data-rights, missing-policy, unknown-policy-target