<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Custom Role creation crashes old sites. in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241516#M194646</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;solution ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Dec 2009 14:17:21 GMT</pubDate>
    <dc:creator>djau</dc:creator>
    <dc:date>2009-12-14T14:17:21Z</dc:date>
    <item>
      <title>Custom Role creation crashes old sites.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241511#M194641</link>
      <description>Hi,&amp;nbsp;&amp;nbsp;&amp;nbsp; I have Alfresco 3.2 setup on ubuntu mysql tomcat.&amp;nbsp;&amp;nbsp;&amp;nbsp; I already had some sites on my setup and then I got requirement to create some custom roles for new sites that will be created.&amp;nbsp;&amp;nbsp; I followed following link to make custom role&amp;nbsp; http://wiki.alfresco.com/wiki/Custom_Permissions_in_Share&amp;nbsp;&amp;nbsp;&amp;nbsp; Bu</description>
      <pubDate>Wed, 25 Nov 2009 16:03:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241511#M194641</guid>
      <dc:creator>avin_jss</dc:creator>
      <dc:date>2009-11-25T16:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Role creation crashes old sites.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241512#M194642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is thier anyway to save custom authority for a old site in database????&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Nov 2009 12:54:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241512#M194642</guid>
      <dc:creator>avin_jss</dc:creator>
      <dc:date>2009-11-27T12:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Role creation crashes old sites.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241513#M194643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try this javascript. Save it in Data Dictionary, Scripts as fixPermission.js&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;var n=search.findNode("workspace://SpacesStore/bc93bd54-384e-413c-b085-dc9e0314d53f"); &lt;BR /&gt;if(n!=null)&lt;BR /&gt;{&lt;BR /&gt;n.setPermission("SiteCustomManager", "GROUP_site_mysite_SiteCustomManager")&lt;BR /&gt;}&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;You have to replace the workspace://SpacesStore/bc93bd54-384e-413c-b085-dc9e0314d53f with the correct id for your space, that is the space id you can find in Alfresco Explorer. Navigate to Company Home/Sites/mysite and select View details. Right click on 'Alfresco Node Reference' and select 'Copy link location'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Execute the script from any space in Alfresco explorer suing 'Run Action', execute script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have not tested this, so you may have to adopt a bit.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Nov 2009 13:57:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241513#M194643</guid>
      <dc:creator>loftux</dc:creator>
      <dc:date>2009-11-27T13:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Role creation crashes old sites.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241514#M194644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;setting the permission is not following the problem, i think we create authority then add authority.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So can you please suggest a new javascript for that&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2009 10:05:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241514#M194644</guid>
      <dc:creator>avin_jss</dc:creator>
      <dc:date>2009-11-30T10:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Role creation crashes old sites.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241515#M194645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Finally i got the solution and i will posted soon.It required backward compatibility in alfresco share.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2009 06:25:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241515#M194645</guid>
      <dc:creator>avin_jss</dc:creator>
      <dc:date>2009-12-01T06:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Role creation crashes old sites.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241516#M194646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;solution ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2009 14:17:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241516#M194646</guid>
      <dc:creator>djau</dc:creator>
      <dc:date>2009-12-14T14:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Role creation crashes old sites.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241517#M194647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have the same error, so I´d like to know how can I resolve this problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Mar 2010 18:38:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241517#M194647</guid>
      <dc:creator>oscgon</dc:creator>
      <dc:date>2010-03-08T18:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Role creation crashes old sites.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241518#M194648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;please, I have the same problem now, could you please be so kind and post the solution you got? THANKS!!! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Jan 2011 21:01:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241518#M194648</guid>
      <dc:creator>roseta</dc:creator>
      <dc:date>2011-01-22T21:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Role creation crashes old sites.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241519#M194649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have this same problem. Any solution yet?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 May 2011 18:01:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241519#M194649</guid>
      <dc:creator>jperilla</dc:creator>
      <dc:date>2011-05-03T18:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Role creation crashes old sites.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241520#M194650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;At moment the best solution I had found to fix permissions in older share after create new roles is that&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;var allSites = siteService.listSites(null, null, 0);&lt;BR /&gt;&lt;BR /&gt;//var logFile = companyhome.childByNamePath("log.txt");&lt;BR /&gt;//&amp;nbsp;&amp;nbsp; if (logFile == null)&lt;BR /&gt;//&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; logFile = companyhome.createFile("log.txt");&lt;BR /&gt;//&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&lt;BR /&gt;for (var siteIndex = 0; siteIndex &amp;lt; allSites.length; siteIndex++) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; createAuthorities(allSites[siteIndex].shortName, [CustomRole,CustomRole2], allSites[siteIndex].getNode());&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;function createAuthorities(siteName, rolesList, siteNode) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var siteExp = "site_" + siteName;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var prefix = siteExp + "_";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//var n=search.findNode("workspace://SpacesStore/"+siteId);&lt;BR /&gt;&lt;BR /&gt;//logFile.content = "Site.id :"+siteNode.id+"\r\n";&lt;BR /&gt;//logFile.content += "Node :"+siteNode+"\r\n";&lt;BR /&gt;//logFile.save();&lt;BR /&gt;&amp;nbsp;&amp;nbsp; var rootGroup = groups.getGroup(siteExp);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; for (var roleIndex = 0; roleIndex &amp;lt; rolesList.length; roleIndex++) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var groupName = prefix + rolesList[roleIndex];&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (groups.getGroup(groupName) == null){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;rootGroup.createGroup(groupName,siteName+"_"+rolesList[roleIndex]);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(siteNode!=null)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;//logFile.content += "Group :GROUP_" + groupName+"\r\n";&lt;BR /&gt;//logFile.save();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;siteNode.setPermission(rolesList[roleIndex], "GROUP_" + groupName);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Where CustomRole and CustomRole2 are the role name we had created in sitePermissionDefinitions.xml. If you only want to fix the permissions, just only comment the createGroup lines.&lt;BR /&gt;There are a collateral effect that I don't know how to solve it. Alfresco have some zones where which contains the node groups linked to the roles. In fact in share that zone is APP.SHARE. The elements contained in that zone are invisible to user in UI, so usually we don't know what are storage in. When we create a group needed for new roles, it is created in a public zone so we will see a lot of groups named like roles in our Groups Management UI. The ideal aproach is make that groups in APP.SHARE zone but doing it in Javascript API I can't. I think I must use Java.&lt;BR /&gt;&lt;BR /&gt;I hope this can help you and be a nice workaround.&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2011 07:58:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241520#M194650</guid>
      <dc:creator>kszosze</dc:creator>
      <dc:date>2011-06-09T07:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Role creation crashes old sites.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241521#M194651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried the js script, but I get this error :&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;Failed the actions due to error: Failed to execute script 06270393 'workspace://SpacesStore/b3deffd0-e0e0-47f3-b210-05e4f9c2c131': 06270392 ReferenceError: "MyCustomCollaborator" is not defined (workspace://SpacesStore/b3deffd0-e0e0-47f3-b210-05e4f9c2c131#10)&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;Did someone solve this issue ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2011 14:48:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241521#M194651</guid>
      <dc:creator>tomen</dc:creator>
      <dc:date>2011-07-27T14:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Role creation crashes old sites.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241522#M194652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We had a very similar issue for our site, but as far as we know, we didn't create any new custom roles; we just edited files like the workflowModel.xml, adhoc_processdefinition.xml, etc. We ended up getting the error for "GROUP_site_[sitename]_All" on all sites, which I think is an Alfresco default group. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;kszosze's script worked for us, so I'm not sure what issue the other poster was having (though I note the same thing happened to a completely different person in &lt;/SPAN&gt;&lt;A href="http://forums.alfresco.com/en/viewtopic.php?f=47&amp;amp;t=37261&amp;amp;p=117779#p117049" rel="nofollow noopener noreferrer"&gt;this other thread&lt;/A&gt;&lt;SPAN&gt;). Did you remember to replace all instances of "CustomRole, CustomRole2" with your own value(s)?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Aug 2011 16:10:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241522#M194652</guid>
      <dc:creator>nadaoneal</dc:creator>
      <dc:date>2011-08-08T16:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Role creation crashes old sites.</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241523#M194653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In fact, I made a huge mistake, I replaced customeRole by SiteCustomManager instead of "SiteCustomManager" !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It works great.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2011 09:45:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-role-creation-crashes-old-sites/m-p/241523#M194653</guid>
      <dc:creator>tomen</dc:creator>
      <dc:date>2011-08-11T09:45:49Z</dc:date>
    </item>
  </channel>
</rss>

