I had to add groups of users as administrators to the Alfresco configuration. As this is a common requested feature, I will explain how I did it. This will also be a good example of how to tweak Alfresco internal classes by overriding its Spring beans. Before reading further, you should have read the howto on Alfresco modules creation.

In an org.alfresco.sample package in the source/java folder of the module, add the following class. This class will subclass the default Alfresco AuthorityService implementation to change only the setAdminUsers() method defining the administrators from the Spring configuration.

public class MyAuthorityService extends AuthorityServiceImpl {
    private TransactionService transactionService;

    public void setAdminUsers(Set pConfig) {
        UserTransaction txn = transactionService.getUserTransaction();
        try {

            HashSet users = new HashSet();

            Iterator iter = pConfig.iterator();

            while (iter.hasNext()) {
                String authority = iter.next();
                AuthorityType type = AuthorityType.getAuthorityType(authority);

                if (type.equals(AuthorityType.GROUP) && authorityExists(authority)) {
                    // Get all the group's users
                    Set groupLogins = getContainedAuthorities(AuthorityType.USER, authority, false);
                } else {

        } catch (Exception e) {
            try { txn.rollback(); } catch (Exception e1) { }

    public void setTransactionService(TransactionService pTransactionService) {
        this.transactionService = pTransactionService;

Now that the implementation is changed, we need to tell Alfresco to use it instead of the default one. For this, add the following bean definition to the module-context.xml file. This Spring configuration is a copy of the one in the authority-service-context.xml file with some changes to use our own implementation. As our implementation needs the transaction service, it has been added as a property to the bean configuration.

<bean id="authorityService" class="org.alfresco.sample.MyAuthorityService">
    <property name="authenticationComponent">
        <ref bean="authenticationComponent" />
    <property name="personService">
        <ref bean="personService" />
    <property name="nodeService">
        <ref bean="nodeService" />
    <property name="authorityDAO">
        <ref bean="authorityDAO" />
    <property name="permissionServiceSPI">
        <ref bean="permissionServiceImpl" />
    <property name="transactionService">
        <ref bean="transactionService" />
    <property name="adminUsers">

It is now possible to set the full name of a groupe in the administrators' list. In the example case, all the users of the GROUP_Administrators group will be administrators of Alfresco.