Class ComponentPermissions
java.lang.Object
com.inductiveautomation.vision.api.client.components.model.security.ComponentPermissions
- 
Field SummaryFieldsModifier 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 SummaryConstructorsConstructorDescriptionFor serialization only.ComponentPermissions(boolean inheritPermissions, String[] requiredRoles, ComponentRestriction[] restrictions) ComponentPermissions(SecuritySettings legacy) Creates a component permissions object based on a legacy SecuritySetttings object
- 
Method SummaryModifier 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- 
DISABLEShared instance of the component restriction that disables a component
- 
HIDEShared instance of the component restriction that hides a component
- 
DISABLE_SCRIPTSShared instance of the component restriction that disables event scripts
- 
ACCESS_DENIED_OVERLAYShared instance of the component restriction that displays an opaque access denied overlay
- 
DEFAULT_PERMISSIONS
 
- 
- 
Constructor Details- 
ComponentPermissionspublic ComponentPermissions()For serialization only.
- 
ComponentPermissions
- 
ComponentPermissionspublic ComponentPermissions(boolean inheritPermissions, String[] requiredRoles, ComponentRestriction[] restrictions) 
- 
ComponentPermissionsCreates a component permissions object based on a legacy SecuritySetttings object
 
- 
- 
Method Details- 
getFetch 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.
- 
setSet the permissions on a component.
- 
toJsonpublic com.inductiveautomation.ignition.common.gson.JsonElement toJson()
- 
fromJsonpublic static ComponentPermissions fromJson(com.inductiveautomation.ignition.common.gson.JsonElement json) 
- 
hasAccessChecks 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
- 
isInvertRolespublic boolean isInvertRoles()
- 
setInvertRolespublic void setInvertRoles(boolean invertRoles) 
- 
isInheritPermissionspublic boolean isInheritPermissions()
- 
setInheritPermissionspublic void setInheritPermissions(boolean inheritPermissions) 
- 
getRequiredRoles
- 
setRequiredRoles
- 
getRestrictions
- 
setRestrictions
- 
equals
 
-