Class ZoneRoleRequirement
java.lang.Object
com.inductiveautomation.ignition.common.user.ZoneRoleRequirement
- All Implemented Interfaces:
Serializable
Represents a permission requirement, where the request must originate from a specific security zone
and/or be initiated by a user which has a certain role.
Represents a Security Zone and/or a Rolename. Either may be null or blank, which indicates that permission will be granted.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static enum
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty ctor for xml serializationZoneRoleRequirement
(String zone, String role) -
Method Summary
Modifier and TypeMethodDescriptioncheckAccess
(Collection<String> roles, Collection<String> zones) Given a collection of zones and roles that are present for a request, check whether or not this requirement is satisfied.boolean
static ZoneRoleRequirement
Used by NamedQuery to make a default any/any security zone requirement.getRole()
getZone()
int
hashCode()
void
void
-
Constructor Details
-
ZoneRoleRequirement
public ZoneRoleRequirement()Empty ctor for xml serialization -
ZoneRoleRequirement
-
-
Method Details
-
getEmptyZoneRoleRequirement
Used by NamedQuery to make a default any/any security zone requirement.- Returns:
- A new ZoneRoleRequirement with both zone and role set to null.
-
getZone
-
setZone
-
getRole
-
setRole
-
checkAccess
public ZoneRoleRequirement.PermissionResult checkAccess(@Nullable Collection<String> roles, @Nullable Collection<String> zones) Given a collection of zones and roles that are present for a request, check whether or not this requirement is satisfied.- Parameters:
roles
- List of roles the requester has. May be null; null returns denied.zones
- List of zones the requester is in. May be null; null should match Default.
-
equals
-
hashCode
public int hashCode()
-