java.lang.Object
edu.internet2.middleware.grouper.permissions.limits.LimitElUtils

public class LimitElUtils extends Object
innocuous methods that can be used from EL. Make sure there are no security problems where bad users can do bad things
  • Constructor Details

    • LimitElUtils

      public LimitElUtils()
  • Method Details

    • labelsContain

      public static boolean labelsContain(String labelsForUser, String labelsInConfig)
      see if the labels in the config contain any of the labels for the user
      Parameters:
      labelsForUser - comma separated, and trimmed
      labelsInConfig - comma separated, and trimmed
      Returns:
      true if contains
    • ipOnNetwork

      public static boolean ipOnNetwork(String ipString, String networkIpString, int mask)
      see if an ip address is on a network
      Parameters:
      ipString - is the ip address to check
      networkIpString - is the ip address of the network
      mask - is the length of the mask (0-32)
      Returns:
      boolean
    • ipOnNetworks

      public static boolean ipOnNetworks(String ipString, String networkIpStrings)
      see if an ip address is on a network
      Parameters:
      ipString - is the ip address to check
      networkIpStrings - are the ip addresses of the networks, e.g. 1.2.3.4/12, 2.3.4.5/24
      Returns:
      boolean
    • ipOnNetworkRealm

      public static boolean ipOnNetworkRealm(String ipAddress, String realmName)
      if the ip address is on the realm name in the grouper.properties in grouper.permissions.limits.realm.realmName
      Parameters:
      ipAddress -
      realmName -
      Returns:
      if the ip address is on the realm name in the grouper.properties