Search code examples
alfrescoalfresco-shareadministration

Alfresco - How to make admin unable to delete user from Active Directory


Is there a way to make admin not able to delete user from Active Directory? I need to disable this feature some how in global properies or else. I want admin only to create users,edit them and disable them, but not delete. The version of Alfresco is Community 5.2. Thanks in advance.


Solution

  • I guess you mean the other way around:

    Is there a way to prevent admin from deleting users which have been created by ldap sync?

    or do you mean:

    Is there a way to revoke permission to delete any user?

    Do you understand the difference between a user which has been created by ldap sync and a user manually created in the Alfresco admin UI?

    There is no (easy and supported) way I know of to restrict admin permissions or for a member of the group ALFRESCO_ADMINISTRATORS. The ROLE_ADMINISTRATOR has always any permission.

    There maybe a way to achieve what you expect in a customization module implementing a new behavior which disallows user deletion in a specific zone or by creating your own permissionGroups/permissions in a customPermissionDefinitions, setting the new introduced permissions on the user zones to specific groups but that kind of customization would be hard to maintain on later updates/upgrades.

    EDIT: What is your use case for allowing (end) users to create new users inside Alfresco although you have an user directory (AD) in place?

    If your aim is to support external users, managed by specific internal user groups you may add another directory like samba4 which your internal users may get permissions to create/delete users (that's what we actually do from/thru our CRM system) or if you prefer integrations with OAuth2 providers such as Google, Facebook, Github you may take a look on the Spring Cloud Gateway for the Alfresco platform project