title: Configuring Share Roles in Existing Installation
body: <p>I'm trying to create a new role (permissions group) for Share sites in a existing installation. Before asking I did my 'homework' and found useful resources such as:</p>
  
  <ul>
  <li><p><a href="http://forums.alfresco.com/forum/installation-upgrades-configuration-integration/configuration/defining-new-roles-01302007-1900" rel="nofollow">http://forums.alfresco.com/forum/installation-upgrades-configuration-integration/configuration/defining-new-roles-01302007-1900</a></p></li>
  <li><p><a href="https://wiki.alfresco.com/wiki/Custom_Permissions_in_Share" rel="nofollow">https://wiki.alfresco.com/wiki/Custom_Permissions_in_Share</a></p></li>
  </ul>
  
  <p>Among others.</p>
  
  <p>I have no problem in configuring my new role, it works like a charm in a clean installation or in new sites, the issue that I have is that I need to have the role available for existing sites.</p>
  
  <p>To do so, I have created a sub-group in the system group that represents the site. For instance say <code>GROUP_site_{siteId}</code> is the site, I created a sub-group called <code>GROUP_site_{siteId}_MyCustomRole</code>. The problem is that <strong>the sub-group is created in the <code>APP.DEFAULT</code> zone and to make it work properly it MUST be in the <code>APP.SHARE</code> zone (please anybody correct me if I'm wrong).</strong></p>
  
  <p>Basically that's the problem I'm having... I need to 'upgrade' existing sites but I'm not sure of how I could create sub-groups in the <code>APP.SHARE</code> zone.</p>
  
  <p>I have read the JavaScript API and the REST services documentation and it seems that zones management is not supported. The only way I see it can be achieved is through the Java API, specifically with the Authority service: <a href="http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/service/cmr/security/AuthorityService.html" rel="nofollow">http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/service/cmr/security/AuthorityService.html</a></p>
  
  <p>Now, assuming that the Java Authority service is my only option, which would be the right approach to implement the upgrade functionality that creates the child authorities in the appropriate zone? Perhaps by creating a custom patch (<a href="http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/repo/admin/patch/impl/package-summary.html" rel="nofollow">http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/repo/admin/patch/impl/package-summary.html</a>)?</p>
  
  <p>Unless I'm taking the wrong approach, I'd like to hear from people who had the same issue, otherwise some advice would be really appreciated. I'd be really surprised if I'm the only one that need to create a new role for existing sites...</p>
  
  <p>EDIT:</p>
  
  <p>This problem is tracked here: <a href="https://issues.alfresco.com/jira/browse/MNT-2456" rel="nofollow">https://issues.alfresco.com/jira/browse/MNT-2456</a></p>