How to check if user is a site admin in share side webscript? I need this so admins are able to view certain features.
Solved! Go to Solution.
Is there something that can be used in a ftl file to compare or check for Site Manager permisssion? Likke we can put the outcome of this query in model (e.g model.isAdminQuery = ??? ) and check it in ftl
@kaynezhang wrote:Try
if (user.properties["alfUserGroups"].indexOf("GROUP_SITE_ADMINISTRATORS") != -1) { //do something }
Try
if (user.properties["alfUserGroups"].indexOf("GROUP_SITE_ADMINISTRATORS") != -1) { //do something }
Is there something that can be used in a ftl file to compare or check for Site Manager permisssion? Likke we can put the outcome of this query in model (e.g model.isAdminQuery = ??? ) and check it in ftl
@kaynezhang wrote:Try
if (user.properties["alfUserGroups"].indexOf("GROUP_SITE_ADMINISTRATORS") != -1) { //do something }
I'm sorry I haven't use it in FTL before ,But I thinke you can extend the webscript backend js and put the result of group membership into the returned model, And then use it in ftl
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.