public interface

WebPrivilegeEntry

com.microstrategy.web.objects.admin.users.WebPrivilegeEntry

Class Overview

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.

Summary

Public Methods
abstract String getDescription()
Returns the description of the privilege, localized to the display locale on the session.
abstract String getName()
Returns the name of the privilege, localized to the display locale on the session.
abstract SimpleList getOrigins()
Returns a SimpleList of WebPrivilegeOrigin objects, which contain the origins of the privilege.
abstract SimpleList getOrigins(WebProject project)
Returns a SimpleList of WebPrivilegeOrigin objects, which is a list of origins for this privilege in only the specified project.
abstract int getType()
Returns the type of this privilege.
abstract void grant()
Grants the given privilege to the user.
abstract boolean isGranted()
This method is deprecated. Please use isPrivilegeGranted() instead.
abstract boolean isGranted(WebProject project)
This method is deprecated. The method returns the opposite of what is expected. Hence, please use isPrivilegeGranted(WebProject) instead.
abstract boolean isGrantedLocally()
Returns whether the user has the privilege set directly on it.
abstract boolean isPrivilegeGranted()
Returns whether the user has this privilege from any source - set directly, inherited, or from a security role, on any project.
abstract boolean isPrivilegeGranted(WebProject project)
Returns whether the user has the privilege in the given project.
abstract void revoke()
Revokes the privilege from the user.

Public Methods

public abstract String getDescription ()

Returns the description of the privilege, localized to the display locale on the session.

Returns
  • The description of the privilege.

public abstract String getName ()

Returns the name of the privilege, localized to the display locale on the session.

Returns
  • The name of the privilege.

public abstract SimpleList getOrigins ()

Returns a SimpleList of WebPrivilegeOrigin objects, which contain the origins of the privilege.

Returns

public abstract SimpleList getOrigins (WebProject project)

Returns a SimpleList of WebPrivilegeOrigin objects, which is a list of origins for this privilege in only the specified project.

Parameters
project A WebProject object, representing the project to get privilege origins for.
Returns

public abstract int getType ()

Returns the type of this privilege.

Returns

public abstract void grant ()

Grants the given privilege to the user. This will set the privilege to be granted directly to the user.

public abstract boolean isGranted ()

This method is 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.

public abstract boolean isGranted (WebProject project)

This method is 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.