Class DocumentPermissionHelper


  • @Deprecated
    public final class DocumentPermissionHelper
    extends Object
    Deprecated.
    since 7.4. Methods to managing permissions are now on ACP / ACL.
    Helper for AddPermission and RemovePermission operations.
    Since:
    5.8
    • Method Detail

      • addPermission

        public static boolean addPermission​(ACP acp,
                                            String aclName,
                                            String userName,
                                            String permission,
                                            boolean blockInheritance,
                                            String currentPrincipalName)
        Deprecated.
        Parameters:
        acp - The ACP to modify
        aclName - the name of the ACL to target
        userName - the name of the principal (user or group)
        permission - the permission of the ACE
        blockInheritance - Should we block inheritance
        currentPrincipalName - the creator
        Returns:
        true if something has changed on the document security
      • addPermission

        public static boolean addPermission​(ACP acp,
                                            String aclName,
                                            String userName,
                                            String permission,
                                            boolean blockInheritance,
                                            String currentPrincipalName,
                                            Calendar begin,
                                            Calendar end,
                                            Map<String,​Serializable> contextData)
        Deprecated.
        Parameters:
        acp - The ACP to modify
        aclName - the name of the ACL to target
        userName - the name of the principal (user or group)
        permission - the permission of the ACE
        blockInheritance - should we block inheritance
        currentPrincipalName - the creator
        begin - the begin date of the ACE
        end - the end date of the ACE
        Returns:
        true if something has changed on the document security
        Since:
        7.4
      • removePermission

        public static boolean removePermission​(ACP acp,
                                               String aclName,
                                               String principalName)
        Deprecated.
        Parameters:
        acp - The ACP to modify
        aclName - the name of the ACL to target
        principalName - the name of the principal (user or group)
        Returns:
        true if something has changed on the document security
      • removePermissionById

        public static boolean removePermissionById​(ACP acp,
                                                   String aclName,
                                                   String id)
        Deprecated.
        Removes an ACE given its id.
        Parameters:
        acp - The ACP to modify
        aclName - the name of the ACL to target
        id - the id of the ACE
        Returns:
        true if something has changed on the document security
        Since:
        7.3