Friday, November 30, 2012

... and letting Alfresco Share know about custom permissions

Again this is Spring magic, i didn't know how to get Spring to update an Array, so I replaced it, but then you must check Alfresco context-xml for each version to check if it changes - dependencies :(

 <!-- adds to script-services-context.xml -->
 <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean" depends-on="jsonConversionComponent">
        <property name="targetObject" >
            <ref bean="jsonConversionComponent"/>
        <property name="targetMethod" value="setUserPermissions" />
        <property name="arguments">
                <array value-type="java.lang.String">
                    <!-- Standard ones -->
                    <!-- customised ones -->

This will let Alfresco Share see the CRUD-permission 'Finalise' defined as 'Permission' in the Alfresco Repository Permission Model (extension). Then you can use this in your share-config-custom.xml where your actions now can be dependant on this permission

            <action id="...
                    <permission allow="true">Finalise</permission>


About making custom share actions see here among others

No comments:

Post a Comment