メインコンテンツにスキップ

スーパー管理者

スーパーアドミンはシステム全体の管理者であり、RBAC、ABAC、RBACなどのモデルでドメインなどで使用できます。 詳細な例は次のとおりです。

[request_definition]
r = sub, obj, act

[policy_definition]
p = sub, obj, act

[policy_effect]
e = some(where (p.eft == allow))

[matchers]
m = r.sub == p.sub && r.obj == p.obj && r.act == p.act || r.sub == "root"

It illustrates that as for the defined request_definition, policy_definition, policy_effect and matchers, Casbin judges if the request can match the policy, or most importantly, if the sub is root. 判断が正しければ、許可は許可され、ユーザーはすべてを行うことができます。
Linuxシステムのルートと同様に、ユーザーがrootとして認可された後。 それからすべてのファイルと設定にアクセスする権限があります So if we want sub to have the full access to the whole system, we can let it become the super admin, then the sub has the permission to do everything.