Hello All,
I want to get all roles whether it is custom or OOTB present under the Users site for using it.
Since i have seen only a way to get role of a current user only. So whether it is possible to get all the roles from the site??
Thanks.
Hi,
I think this piece of code may help you out for your requirement:-
public ScriptableHashMap<String, String> getSitePermissionGroups() { if (this.siteRoleGroups == null) { List<String> roles = this.siteService.getSiteRoles( this.siteInfo.getShortName() ); this.siteRoleGroups = new ScriptableHashMap<String, String>(); for (String role : roles) { this.siteRoleGroups.put( role, this.siteService.getSiteRoleGroup(this.siteInfo.getShortName(), role)); } } return this.siteRoleGroups; }
See you will get Groups associated with all the roles present in your site.
Please apply and get back to me.
Thanks,
Piyush Patel
Hi,
Could you provide me the whole approach or code which i should add to the piece of code you provided to me.
Or please someone can you please help me out by providing whole steps to follow or where should i add this code on my SDK. Since i am new to Alfresco any help regarding this will be very helpful.
Thanks.
Hi all,
Please someone could guide me through it though @piyush48 tried to help me but could someone please provide code and path where i should place it.
I am new in alfresco and have urgent requirement for this.
Thanks,
Piyush
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.