@mhock - Yes, you can do some customisation here: Below is the reference code: <#if !user.anonymous>
<#assign userEmail = rest("/users/id/${user.id}/").user />
</#if>
<#list userEmail as getEmail>
<#assign spiltEmail = getEmail.email?split("@") />
<#assign getSplittedEmail = spiltEmail[1]?split(".") />
<#assign SplittedEmail = getSplittedEmail[0] />
</#list>
<#assign getUserRole = restadmin("/users/id/${user.id}/roles").roles.role />
<#assign rolesA = [] />
<#list getUserRole as role >
<#assign rolesA = rolesA + [role.name?js_string] />
</#list>
With the above code, you will get user email and user role, after that use the following query and check if user email contains a particular domain or not. <#assign addRole = restadmin("/roles/name/[roleName]/users/add?role.user=id/${userID}") /> Please let me know if you have any questions. Thanks!
... View more