Class DesignerPermissionUtil
- java.lang.Object
-
- com.inductiveautomation.ignition.common.project.DesignerPermissionUtil
-
public class DesignerPermissionUtil extends java.lang.Object
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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
canCreateProject(java.util.List<java.lang.String> gatewayRoles, User user)
static boolean
canDeleteProject(GlobalProps props, User user)
static boolean
canDeleteProject(GlobalProps props, java.util.Collection<java.lang.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(java.util.List<java.lang.String> viewRoles, User user)
static boolean
hasPermission(User user, java.util.Collection<java.lang.String> requiredRoles)
static boolean
hasPermission(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)
-
-