AUTH:set_usergroup()
Sets a new user group that is configured in the current authentication policy. A new realm can also be set at the same time. It returns true if successful, otherwise, false. A realm name and a user group name are needed as input parameters.
The user group specified by the function must be in the authentication policy referenced by the VS. The result specified by the new user group will override the authentication result of the original authentication policy.
Syntax
AUTH:set_usergroup(“RealmName”, "UserGroupName");
Arguments
| Name | Description |
|---|---|
|
RealmName |
The name of the new realm to be set. (Lua string with maximum length of 63). |
|
UserGroupName |
The name of the user group to be set. (Lua string with maximum length of 63, must also comply with original definition of user group). |
Events
Applicable in BEFORE_AUTH.
Example
when BEFORE_AUTH {
r = AUTH:set_usergroup(“Realm02”, "UserGroup02");
debug("set_usergroup successfully? %s\n", tostring(r));
}
Supported Version
FortiADC version 7.2.x and later.