Forum Discussion
- PayalDirector
Abhilasha - You can create a custom component which will only be access by admins by adding the following code:
<#assign isAdmin = false /> <#list restadmin("/users/id/${user.id?c}/roles").roles.role as mainrole> <#if mainrole.name?? && (mainrole.name == "Administrator")> <#assign isAdmin = true /> <#break> </#if> </#list> <#if isAdmin> .....................YOUR CODE HERE...................... </#if>
To add the roles to users, you need to use API in your code:
Please let me know if this helps.
Thanks!
- browneandraeExpert
From the looks of it , you can't here is what you can do to different update a user and also different entities, https://community.khoros.com/t5/Developer-Documentation/bd-p/dev-doc-portal?section=commv2&collection=users#action-update
- lukBoss
browneandrae adding/removing role is unfortunately not possible with API v2 but definitely with v1 as Payal wrote above!
- browneandraeExpert
luk nice where are the docs for api v1 ?
Related Content
- 7 months ago
- 12 months ago
- 2 years ago