Class AccessControlList

    • Field Detail

      • REMOVE_INHERIT_COPY_PERMISSIONS

        public static final int REMOVE_INHERIT_COPY_PERMISSIONS
        See Also:
        Constant Field Values
      • REMOVE_INHERIT_REMOVE_PERMISSIONS

        public static final int REMOVE_INHERIT_REMOVE_PERMISSIONS
        See Also:
        Constant Field Values
    • Method Detail

      • getId

        public java.lang.String getId()
      • isInheriting

        public boolean isInheriting()
      • setInheriting

        public void setInheriting​(boolean inheriting)
      • getParentId

        public java.lang.String getParentId()
      • setParentId

        public void setParentId​(java.lang.String parentId)
      • setImpliedPermissions

        public void setImpliedPermissions​(int[] permissionImplies)
      • inherit

        public void inherit​(AccessControlList parentAccessControlList,
                            java.util.HashMap<java.lang.Integer,​java.lang.Integer> permissionsMapping)
      • removeInheritance

        public void removeInheritance​(int removeType)
      • checkPermission

        @Deprecated
        public boolean checkPermission​(java.util.Collection<java.lang.String> principalIds,
                                       IPermission permission)
        Deprecated.
        Since 4.2.1, this method is no longer used and may be removed in the future.
        Checks if any of the given principlas have access to the given permission. If any of the principals are explicitly "denied" permission, this method returns false. Otherwise if any of the principals have access to the given permission, this method returns true.
        Parameters:
        principalIds -
        permission -
        Returns:
      • checkPermission

        public boolean checkPermission​(java.lang.String principalId,
                                       IPermission permission)
                                throws PortalException
        Checks if the specified principal has access to the given permission. This permission check is done taking into account the principal's groups recursively.

        This method needs a transactional context to be executed.

        Parameters:
        principalId - the principal identifier.
        permission - the permission.
        Returns:
        true if the principal has access to the given permission, false otherwise.
        Throws:
        PortalException