Checks if a certain permission of a permission set is denied.<p>

@param p the current CmsPermissionSet
@param value the int value of the permission to check
@return true if the permission is denied, otherwise false
327155
protected Boolean isDenied(CmsPermissionSet p, int value) {

        if ((p.getDeniedPermissions() & value) > 0) {
            return Boolean.TRUE;
        }
        return Boolean.FALSE;
    }
44167
private static boolean isInSet(String value, Set<JQLPlaceHolder> parametersUsedInWhereConditions) {
		for (JQLPlaceHolder ph : parametersUsedInWhereConditions) {
			if (ph.value.equals(value))
				return true;
		}
		return false;
	}
1183117
@Override
    public boolean implies(Permission p) {
        if (!(p instanceof WebSphereSecurityPermission))
            return false;

        WebSphereSecurityPermission that = (WebSphereSecurityPermission) p;

        if (tc.isDebugEnabled()) {
            Tr.debug(tc, "Permission " + this.max + "impliles " + that.max + " = " + (this.max > that.max));
        }

        return (this.max >= that.max);
    }
913973
public static boolean hasAlwaysDeniedPermission(Fragment fragment, List<String> deniedPermissions) {
        return hasAlwaysDeniedPermission(new SupportFragmentSource(fragment), deniedPermissions);
    }
260291
public static boolean isValidIPV4Address(String value) {

        int periods = 0;
        int i = 0;
        int length = value.length();

        if (length > 15)
            return false;
        char c = 0;
        String word = "";
        for (i = 0; i < length; i++) {
            c = value.charAt(i);
            if (c == '.') {
                periods++;
                if (periods > 3)
                    return false;
                if (word == "")
                    return false;
                if (Integer.parseInt(word) > 255)
                    return false;
                word = "";
            } else if (!(Character.isDigit(c)))
                return false;
            else {
                if (word.length() > 2)
                    return false;
                word += c;
            }
        }

        if (word == "" || Integer.parseInt(word) > 255)
            return false;
        if (periods != 3)
            return false;
        return true;
    }
665448
public boolean isPermissionDeclined(@NonNull String permissionsName) {
        return ActivityCompat.checkSelfPermission(context, permissionsName) != PackageManager.PERMISSION_GRANTED;
    }
381982
public static boolean checkPermission(Context context, String permission) {
    boolean hasPermission =
        (PackageManager.PERMISSION_GRANTED == context.checkCallingOrSelfPermission(permission));
    if (!hasPermission) {
      printErrorLog("permission " + permission + " is missing!");
    }
    return hasPermission;
  }
919180
private boolean isBlockingLocked() {

        boolean result = true;
        CmsLockFilter blockingFilter = CmsLockFilter.FILTER_ALL;
        blockingFilter = blockingFilter.filterNotLockableByUser(getCms().getRequestContext().getCurrentUser());
        try {
            List<String> blocking = getCms().getLockedResources(getParamResource(), blockingFilter);
            result = blocking.size() > 0;
        } catch (CmsException e) {
            if (LOG.isDebugEnabled()) {
                LOG.debug(e.getLocalizedMessage(), e);
            }
        }
        return result;
    }
350124
@Override
	public boolean isGranted(final Permission permission, final SecurityContext context) {
		return isGranted(permission, context, false);
	}
574671
public boolean isAnyPermissionPermanentlyDenied() {
    boolean hasPermanentlyDeniedAnyPermission = false;

    for (PermissionDeniedResponse deniedResponse : deniedPermissionResponses) {
      if (deniedResponse.isPermanentlyDenied()) {
        hasPermanentlyDeniedAnyPermission = true;
        break;
      }
    }

    return hasPermanentlyDeniedAnyPermission;
  }
626057
private void performPermissionCheck(CmsObject cms) throws CmsPermissionViolationException {

        if (cms.getRequestContext().getCurrentUser().isGuestUser()) {
            throw new CmsPermissionViolationException(null);
        }
    }
1157226
@Override
	public boolean addPermission(Permission permission)
	{
		if(permissions.contains(permission))
			return false;
		
		return this.permissions.add(permission);
	}
390313
public static boolean hasPermissionOn(String permission, String simpleScope) {
        return securitySupport.isPermitted(permission, new SimpleScope(simpleScope));
    }
1293441
public static boolean isPermissionGranted(@NonNull Fragment context, @NonNull String permission) {
        return ActivityCompat.checkSelfPermission(context.getContext(), permission) == PackageManager.PERMISSION_GRANTED;
    }
439592
private boolean isPid(String value) {
        if ( (value == null)
                || (value.indexOf("+") != -1)
                || (value.indexOf("/") != -1)
                || (value.indexOf(" ") != -1) ) {
            return false;
        }
        int i = value.indexOf(":");
        return i > 0 && i < (value.length() - 1) && value.lastIndexOf(":") == i;
    }
1269437
public boolean hasPermissionForUser(String user, String... permission) {
        List<String> params = new ArrayList<>();

        params.add(user);
        Collections.addAll(params, permission);

        return hasPolicy(params);
    }
1150956
public final boolean hasPermission(@Nonnull Permission p) {
        Authentication a = Jenkins.getAuthentication();
        if (a == SYSTEM) {
            return true;
        }
        return hasPermission(a, p);
    }