Subordination rules (subordination)
Description
The rule set defines subordination relations between users.
Relations are set between users, groups, and roles. There is also a special type - ALL ('all').
Each relation is set between one superior element of one type and several subordinate elements of one type.
Groups and users are specified by identifiers; roles are specified by names.
By default, the "ALL TO ALL" rule is added. If such a rule exists, all other rules have no effect.
Based on the subordination rule set, a subordination cache is calculated containing subordination lists reduced to users and shortened.
If the "ALL TO ALL" subordination rule exists, only it is contained in the cache. The key is the string "all". Otherwise the cache contains one element for each user with a non-empty subordinate list (including the user themselves).
When all other users (including the user themselves) are subordinate to a user, the value 'all' is placed in the cache for that user (in the list).
In other cases, the user is given the identifiers of all other users subordinate to them based on rule expansion through groups and roles.
Fields
{
"id": uuid,
"top_type": str,
"top_key": str,
"sub_type": str,
"sub_keys": array<str>,
"opts": {
"title": str,
"comment": str
},
"ext": {
"ct": date,
"lwt": date
}
}