Interface WebPrivilegeEntry


  • public interface WebPrivilegeEntry
    The WebPrivilegeEntry interface represents a single privilege. This object is obtained from a WebPrivileges collection. This interface can be used to grant or revoke the privilege on the user, and find information about the origin of the privilege.
    Since:
    MicroStrategy Web 7.5.2
    • Method Detail

      • isGranted

        boolean isGranted()
        Deprecated.
        Please use isPrivilegeGranted() instead.
        Returns whether the user has this privilege from any source - set directly, inherited, or from a security role, on any project.
        Returns:
        True if the user has the privilege from any source, false otherwise.
      • isGranted

        boolean isGranted​(WebProject project)
        Deprecated.
        The method returns the opposite of what is expected. Hence, please use isPrivilegeGranted(WebProject) instead.
        Returns whether the user has the privilege in the given project.
        Parameters:
        project - The WebProject object to look up the privilege in.
        Returns:
        True if the user has the given privilege in the project, false otherwise.
      • isPrivilegeGranted

        boolean isPrivilegeGranted()
        Returns whether the user has this privilege from any source - set directly, inherited, or from a security role, on any project.
        Returns:
        True if the user has the privilege from any source, false otherwise.
        Since:
        MicroStrategy Web 8.1.1
      • isPrivilegeGranted

        boolean isPrivilegeGranted​(WebProject project)
        Returns whether the user has the privilege in the given project.
        Parameters:
        project - The WebProject object to look up the privilege in.
        Returns:
        True if the user has the given privilege in the project, false otherwise.
        Since:
        MicroStrategy Web 8.1.1
      • isGrantedLocally

        boolean isGrantedLocally()
        Returns whether the user has the privilege set directly on it.
        Returns:
        True if the privilege is set directly on the user, false otherwise.
      • grant

        void grant()
        Grants the given privilege to the user. This will set the privilege to be granted directly to the user.
      • revoke

        void revoke()
        Revokes the privilege from the user. This will revoke the privilege if it is set directly on the user. It will have no effect on privileges inherited from a group or security role.
      • getType

        int getType()
        Returns the type of this privilege.
        Returns:
        The type of privilege this object represents, from EnumDSSXMLPrivilegeTypes.
      • getName

        java.lang.String getName()
        Returns the name of the privilege, localized to the display locale on the session.
        Returns:
        The name of the privilege.
      • getDescription

        java.lang.String getDescription()
        Returns the description of the privilege, localized to the display locale on the session.
        Returns:
        The description of the privilege.