Subordination rules (subordination)
Description
A set of rules defines the subordination relationship between users.
Relationships are defined between users, groups and roles. There is also a special type - ALL ('all').
Each relationship is defined between one higher-level element of one of the types and several lower-level elements of one of the types.
Groups and users are specified by identifiers, roles are specified by names.
By default, the rule "ALL TO ALL" is added. If this rule is present, all other rules are irrelevant.
Based on the set of subordination rules, a subordination cache is computed that contains user-cited and abbreviated subordination lists.
If there is an ALL TO ALL subordination rule, the cache contains only it. The key is the string "all". Otherwise, the cache contains one item for each user with a non-empty list of subordinates (including himself).
When a user subordinates all other users (including himself) to a user, the 'all' value (in the list) is cached for that user.
In other cases, the identifiers of all other users subordinate to the user are listed for the user based on the rule sweep via group and role disclosure.
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
}
}