Class LabelPermissionEnforcerImpl

    • Method Detail

      • isLabelableByUser

        public boolean isLabelableByUser​(Labelable object)
        Description copied from interface: LabelPermissionEnforcer
        Checks that the object permits labels to be edited by the logged in user.
        Specified by:
        isLabelableByUser in interface LabelPermissionEnforcer
        Parameters:
        object - - the object to be labelled, if null returns false.
        Returns:
        true if permitted.
      • filterVisibleLabels

        public List filterVisibleLabels​(List labelList,
                                        @Nullable com.atlassian.user.User user,
                                        boolean hideSpecialLabels)
        Description copied from interface: LabelPermissionEnforcer
        Takes a list of label objects and filters out those not visible to the given user
        Specified by:
        filterVisibleLabels in interface LabelPermissionEnforcer
        Parameters:
        labelList - a list of Label objects
        user - the User the labels are filtered for
        hideSpecialLabels - whether to hide special labels, such as favourites
        Returns:
        a filtered list of Label objects
      • filterLabelsByNamespace

        public List filterLabelsByNamespace​(List labelList,
                                            @Nullable com.atlassian.user.User user,
                                            Namespace namespace)
        Description copied from interface: LabelPermissionEnforcer
        Takes a list of label objects and filters out those not in the specified namespace
        Specified by:
        filterLabelsByNamespace in interface LabelPermissionEnforcer
        Parameters:
        labelList - a list of Label objects
        user - the User the labels are filtered for
        namespace - the Namespace to filter by
        Returns:
        a filtered list of Label objects