Get the GroupAmin role inside a group
We are implementing the groups and have a requirement where we need to detect who is the GroupAdmin, we need to show some additional widgets for him. I know how the usual roles work and have implemented those in past using the following code
<#assign show_module = false />
<#list restadmin("/users/id/${user.id?c}/roles").roles.role as role> <#-- REST call to get the user's roles -->
<#if role.name?? && (role.name == "Administrator") || role.name?? && (role.name == "Moderator")>
<#assign show_module = true />
</#if>
</#list>
<#if show_module>
// code to show additional widgets goes here...
</#if>
The roles I am referring to are not the once which we create manually in admin. These fall under the groups tab in admin, and are of two types:
GroupAdmin and GroupMember
Is there any workaround as I have tried all the possible solutions, even asked the support but no success. Basically, the call I am trying is
/restapi/vc/groups/id/[gp_id]/roles/id/[role_id]/users
I need the GroupAdmin in the group in context.