Class ComponentPermissions
java.lang.Object
com.inductiveautomation.vision.api.client.components.model.security.ComponentPermissions
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ComponentRestrictionShared instance of the component restriction that displays an opaque access denied overlaystatic final ComponentPermissionsstatic final ComponentRestrictionShared instance of the component restriction that disables a componentstatic final ComponentRestrictionShared instance of the component restriction that disables event scriptsstatic final ComponentRestrictionShared instance of the component restriction that hides a component - 
Constructor Summary
ConstructorsConstructorDescriptionFor serialization only.ComponentPermissions(boolean inheritPermissions, String[] requiredRoles, ComponentRestriction[] restrictions) ComponentPermissions(SecuritySettings legacy) Creates a component permissions object based on a legacy SecuritySetttings object - 
Method Summary
Modifier and TypeMethodDescriptioncreateInvertedCopy(List<String> roles) booleanstatic ComponentPermissionsfromJson(com.inductiveautomation.ignition.common.gson.JsonElement json) static ComponentPermissionsget(JComponent component) Fetch the security settings for this component.String[]booleanChecks whether or not a user with the given roles has access according to the permissions represented by this object.booleanbooleanstatic voidset(JComponent component, ComponentPermissions permissions) Set the permissions on a component.voidsetInheritPermissions(boolean inheritPermissions) voidsetInvertRoles(boolean invertRoles) voidsetRequiredRoles(String[] requiredRoles) voidsetRestrictions(ComponentRestriction[] restrictions) com.inductiveautomation.ignition.common.gson.JsonElementtoJson() 
- 
Field Details
- 
DISABLE
Shared instance of the component restriction that disables a component - 
HIDE
Shared instance of the component restriction that hides a component - 
DISABLE_SCRIPTS
Shared instance of the component restriction that disables event scripts - 
ACCESS_DENIED_OVERLAY
Shared instance of the component restriction that displays an opaque access denied overlay - 
DEFAULT_PERMISSIONS
 
 - 
 - 
Constructor Details
- 
ComponentPermissions
public ComponentPermissions()For serialization only. - 
ComponentPermissions
 - 
ComponentPermissions
public ComponentPermissions(boolean inheritPermissions, String[] requiredRoles, ComponentRestriction[] restrictions)  - 
ComponentPermissions
Creates a component permissions object based on a legacy SecuritySetttings object 
 - 
 - 
Method Details
- 
get
Fetch the security settings for this component. If none have been set, a default configuration will be returned. This function automatically converts the legacy style SecuritySettings into a ComponentPermissions object. - 
set
Set the permissions on a component. - 
toJson
public com.inductiveautomation.ignition.common.gson.JsonElement toJson() - 
fromJson
public static ComponentPermissions fromJson(com.inductiveautomation.ignition.common.gson.JsonElement json)  - 
hasAccess
Checks whether or not a user with the given roles has access according to the permissions represented by this object. Only checks if inherit=false, that is, doesn't implement inheritance checking - 
createInvertedCopy
 - 
isInvertRoles
public boolean isInvertRoles() - 
setInvertRoles
public void setInvertRoles(boolean invertRoles)  - 
isInheritPermissions
public boolean isInheritPermissions() - 
setInheritPermissions
public void setInheritPermissions(boolean inheritPermissions)  - 
getRequiredRoles
 - 
setRequiredRoles
 - 
getRestrictions
 - 
setRestrictions
 - 
equals
 
 -