Class DesignerPermissionUtil
java.lang.Object
com.inductiveautomation.ignition.common.project.DesignerPermissionUtil
A utility class that assists in verifying permissions given the user and global project props or required roles for
save,publish,view,export,copy, or delete on a project
Note: every permission utility method returns true if the global props are null because the project might not have
any global props, hence granting permission
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
canCreateProject
(List<String> gatewayRoles, User user) static boolean
canDeleteProject
(GlobalProps props, User user) static boolean
canDeleteProject
(GlobalProps props, Collection<String> userRoles) static boolean
canEditProtectedResources
(GlobalProps props, User user) static boolean
canSaveProject
(GlobalProps props, User user) static boolean
canViewProject
(GlobalProps props, User user) static boolean
canViewProject
(List<String> viewRoles, User user) static boolean
hasPermission
(User user, Collection<String> requiredRoles) static boolean
hasPermission
(Collection<String> userRoles, Collection<String> requiredRoles)
-
Method Details
-
hasPermission
public static boolean hasPermission(@Nullable User user, @Nullable Collection<String> requiredRoles) -
hasPermission
public static boolean hasPermission(@Nonnull Collection<String> userRoles, @Nonnull Collection<String> requiredRoles) -
canViewProject
-
canViewProject
-
canCreateProject
-
canSaveProject
-
canEditProtectedResources
-
canDeleteProject
-
canDeleteProject
public static boolean canDeleteProject(@Nullable GlobalProps props, @Nullable Collection<String> userRoles)
-