As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
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
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.
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.
Piyush