Class DesignerPermissionUtil
- java.lang.Object
 - 
- com.inductiveautomation.ignition.common.project.DesignerPermissionUtil
 
 
- 
public class DesignerPermissionUtil extends java.lang.ObjectA 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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancanCreateProject(java.util.List<java.lang.String> gatewayRoles, User user)static booleancanDeleteProject(GlobalProps props, User user)static booleancanDeleteProject(GlobalProps props, java.util.Collection<java.lang.String> userRoles)static booleancanEditProtectedResources(GlobalProps props, User user)static booleancanSaveProject(GlobalProps props, User user)static booleancanViewProject(GlobalProps props, User user)static booleancanViewProject(java.util.List<java.lang.String> viewRoles, User user)static booleanhasPermission(User user, java.util.Collection<java.lang.String> requiredRoles)static booleanhasPermission(java.util.Collection<java.lang.String> userRoles, java.util.Collection<java.lang.String> requiredRoles) 
 - 
 
- 
- 
Method Detail
- 
hasPermission
public static boolean hasPermission(@Nullable User user, @Nullable java.util.Collection<java.lang.String> requiredRoles) 
- 
hasPermission
public static boolean hasPermission(@Nonnull java.util.Collection<java.lang.String> userRoles, @Nonnull java.util.Collection<java.lang.String> requiredRoles) 
- 
canViewProject
public static boolean canViewProject(@Nullable GlobalProps props, @Nullable User user) 
- 
canViewProject
public static boolean canViewProject(@Nullable java.util.List<java.lang.String> viewRoles, @Nullable User user) 
- 
canCreateProject
public static boolean canCreateProject(@Nullable java.util.List<java.lang.String> gatewayRoles, @Nullable User user) 
- 
canSaveProject
public static boolean canSaveProject(@Nullable GlobalProps props, @Nullable User user) 
- 
canEditProtectedResources
public static boolean canEditProtectedResources(@Nullable GlobalProps props, @Nullable User user) 
- 
canDeleteProject
public static boolean canDeleteProject(@Nullable GlobalProps props, @Nullable User user) 
- 
canDeleteProject
public static boolean canDeleteProject(@Nullable GlobalProps props, @Nullable java.util.Collection<java.lang.String> userRoles) 
 - 
 
 -