RBAC with Conditions API
This page documents the API for RBAC with conditions: attaching condition functions to userârole links so that a link is valid only when the condition returns true.
СпÑавкаâ
AddNamedLinkConditionFuncâ
Registers a condition function for the userârole link (userName, roleName). The link is considered valid only when the function returns true.
e.AddNamedLinkConditionFunc("g", "userName", "roleName", YourLinkConditionFunc)
AddNamedDomainLinkConditionFuncâ
Same as above for domain-scoped links: (userName, roleName, domainName). The link is valid only when the condition function returns true.
e.AddNamedDomainLinkConditionFunc("g", "userName", "roleName", "domainName", YourLinkConditionFunc)
SetNamedLinkConditionFuncParamsâ
Sets the parameters passed to the condition function for the link (userName, roleName). Pass one or more string arguments.
e.SetNamedLinkConditionFuncParams("g", "userName", "roleName", "YourConditionFuncParam")
e.SetNamedLinkConditionFuncParams("g", "userName2", "roleName2", "YourConditionFuncParam_1", "YourConditionFuncParam_2")
SetNamedDomainLinkConditionFuncParamsâ
Sets the parameters passed to the condition function for the domain-scoped link (userName, roleName, domainName).
e.SetNamedDomainLinkConditionFuncParams("g", "userName", "roleName", "domainName", "YourConditionFuncParam")
e.SetNamedDomainLinkConditionFuncParams("g", "userName2", "roleName2", "domainName2", "YourConditionFuncParam_1", "YourConditionFuncParam_2")