cancel
Showing results for 
Search instead for 
Did you mean: 

Change default join role

danie_lgr
Champ in-the-making
Champ in-the-making
Hi All

We have recently implemented Alfresco Labs 3.0.0 (Stable) and use the Share site for collaboration. A request has come through to have users join sites with the collaborator role, rather consumer role by default, when clicking the 'Join' button on either the 'Site Finder' page or a page's title bar.

After a lot of searching I have found the following workaround: In webapps/alfresco/WEB-INF/classes/alfresco/model/sitePermissionDefinitions.xml, change the permissionGroup of both SiteContributor and SiteConsumer to permissionGroup="Collaborator".

However this solution is not ideal, as it effectively just makes SiteContributor and SiteConsumer aliases for SiteCollaborator.

The other potential solution I could find was to replace instances of role: "SiteConsumer" with role: "SiteCollaborator" in the following two files:
webapps\share\components\site-finder\site-finder.js
share\components\title\collaboration-title.js
The idea behind this was that the "Join" buttons would assign Collaborator as default, however this solution only worked for the admin user. Any other users would  get the error "Failed to add user X to site Y".

Anything I've missed, or is there a simpler way of achieving this?
1 REPLY 1

mikeh
Star Contributor
Star Contributor
Anything I've missed, or is there a simpler way of achieving this?
No simpler way I'm afraid… and just one area you've missed. There's a specific check in the SiteService to make sure the requested role is SiteConsumer. I'm not sure of the design history behind this check - I'll ask internally.

Anyway, you'll have to grab the code and modify the if statement in SiteServiceImpl.java (org.alfresco.repo.site.SiteServiceImpl) around line #1286 to allow through SiteModel.SITE_COLLABORATOR too.

Thanks,
Mike