AnsweredAssumed Answered

Creating a new permission in a repo amp

Question asked by logxjb on Mar 31, 2014
Latest reply on Mar 31, 2014 by logxjb
Hello,

Following this tutorial: http://ecmarchitect.com/alfresco-developer-series-tutorials/content/tutorial/tutorial.html#implementing-and-deploying-the-model

I wanted to create a new permission.

In the model directory, I've made a duplicate of the original permissionDefinitions.xml file and added my new permission

<blockcode>
<permissionSet type="cm:cmobject" expose="selected">
    ….
    <permissionGroup name="SpecialContributor" allowFullControl="false" expose="true" >
        <includePermissionGroup permissionGroup="Collaborator" type="cm:cmobject" />
    </permissionGroup
</permissionSet>
</blockcode>

In the context directory, I've put the following in the service-context.xml file

<blockcode>
<beans>
   <bean id="${project.artifactId}_extendPermissionModel" parent="permissionModelBootstrap">
       <property name="models">
           <list>
               <value>alfresco/module/${project.artifactId}/model/permissionDefinitions.xml</value>
           </list>
       </property>
   </bean>
</beans>
</blockcode>

Anyway after applying the amp and restarting the server, I'm unable to login on Alfresco.

catalina.out says:

<blockcode>
Mar 31, 2014 1:42:08 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 34252 ms
2014-03-31 13:42:08,241  ERROR [solr.tracker.CoreTracker] [SolrTrackerScheduler_Worker-3] Tracking failed
org.alfresco.error.AlfrescoRuntimeException: 02310001 GetModelsDiff return status is 404
   at org.alfresco.solr.client.SOLRAPIClient.getModelsDiff(SOLRAPIClient.java:1059)
   at org.alfresco.solr.tracker.CoreTracker.trackModels(CoreTracker.java:1897)
   at org.alfresco.solr.tracker.CoreTracker.trackRepository(CoreTracker.java:1227)
   at org.alfresco.solr.tracker.CoreTracker.updateIndex(CoreTracker.java:513)
   at org.alfresco.solr.tracker.CoreTrackerJob.execute(CoreTrackerJob.java:45)
   at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)
</blockcode>

If I uninstall the amp, everything goes fine.

Thanks for any help,
Jérémy

Outcomes