cancel
Showing results for 
Search instead for 
Did you mean: 

How to extend (customize) public-services-security-context.x

tomasp
Champ in-the-making
Champ in-the-making
Hi,

I implemented my own DynamicAuthority and put classes to the AMP file (inspired by https://forums.alfresco.com/en/viewtopic.php?t=17436#p60903). Now I need to customize public-services-security-context.xml:
1. adding bean definition of my new Authority class. I can put this definition to the new *-context.xml (for ex. extended-security-context.xml) and then put this file to the AMP. I think it's OK.
2. insert this bean to the list of used dynamic authorities:


<bean id="permissionServiceImpl" class="org.alfresco.repo.security.permissions.impl.PermissionServiceImpl">

    <property name="nodeService">
        <ref bean="mtAwareNodeService" />
    </property>
    …
    <property name="dynamicAuthorities">
        <list>
            <ref bean="ownerDynamicAuthority" />
            <ref bean="lockOwnerDynamicAuthority" />
            <!– my new dynamic authorities –>
            <ref bean="myDynamicAuthority" />
        </list>
    </property>

</bean>

So it seems I need to edit original public-services-security-context.xml and add appropriate line. But is it a preferred way? Can I put modified file to the AMP for easy installation? Or is there better way to add my bean to the dynamicAuthorities list?

I would like to have solution as compact as possible (due to easy future installation and support). Ideally, all together in the AMP.

Thanks for any suggestion

Tom
2 REPLIES 2

colindstephenso
Champ in-the-making
Champ in-the-making
I would be very interested in knowing if this file can be customised through the proper extension/customisation mechanism.  I will have a tough time with my client customising the original files.

Thanks,
Colin.

douglascrp
World-Class Innovator
World-Class Innovator
I'm trying to fix something related with this on this thread https://forums.alfresco.com/forum/installation-upgrades-configuration-integration/configuration/how-...

Please, let me know if you were able to achieve what you were trying to do.

See ya