Interface WebPrivilegeEntry
-
public interface WebPrivilegeEntry
The WebPrivilegeEntry interface represents a single privilege. This object is obtained from aWebPrivileges
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 Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.lang.String
getDescription()
Returns the description of the privilege, localized to the display locale on the session.java.lang.String
getName()
Returns the name of the privilege, localized to the display locale on the session.SimpleList
getOrigins()
Returns aSimpleList
ofWebPrivilegeOrigin
objects, which contain the origins of the privilege.SimpleList
getOrigins(WebProject project)
Returns aSimpleList
ofWebPrivilegeOrigin
objects, which is a list of origins for this privilege in only the specified project.int
getType()
Returns the type of this privilege.void
grant()
Grants the given privilege to the user.boolean
isGranted()
Deprecated.Please useisPrivilegeGranted()
instead.boolean
isGranted(WebProject project)
Deprecated.The method returns the opposite of what is expected.boolean
isGrantedLocally()
Returns whether the user has the privilege set directly on it.boolean
isPrivilegeGranted()
Returns whether the user has this privilege from any source - set directly, inherited, or from a security role, on any project.boolean
isPrivilegeGranted(WebProject project)
Returns whether the user has the privilege in the given project.void
revoke()
Revokes the privilege from the user.
-
-
-
Method Detail
-
isGranted
@Deprecated boolean isGranted()
Deprecated.Please useisPrivilegeGranted()
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
@Deprecated boolean isGranted(WebProject project)
Deprecated.The method returns the opposite of what is expected. Hence, please useisPrivilegeGranted(WebProject)
instead.Returns whether the user has the privilege in the given project.- Parameters:
project
- TheWebProject
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
- TheWebProject
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
.
-
getOrigins
SimpleList getOrigins()
Returns aSimpleList
ofWebPrivilegeOrigin
objects, which contain the origins of the privilege.- Returns:
- A
SimpleList
ofWebPrivilegeOrigin
objects.
-
getOrigins
SimpleList getOrigins(WebProject project)
Returns aSimpleList
ofWebPrivilegeOrigin
objects, which is a list of origins for this privilege in only the specified project.- Parameters:
project
- AWebProject
object, representing the project to get privilege origins for.- Returns:
- A
SimpleList
ofWebPrivilegeOrigin
object, representing the origins of the privilege.
-
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.
-
-