Class DesignerPermissionUtil

java.lang.Object
com.inductiveautomation.ignition.common.project.DesignerPermissionUtil

public class DesignerPermissionUtil extends 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 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

      public static boolean canViewProject(@Nullable GlobalProps props, @Nullable User user)
    • canViewProject

      public static boolean canViewProject(@Nullable List<String> viewRoles, @Nullable User user)
    • canCreateProject

      public static boolean canCreateProject(@Nullable List<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 Collection<String> userRoles)