class ZMSUtils {

    public static boolean userAuthorityAttrMissing(final String origAttrList, final String checkAttrList) {

        // if the original attr list is empty then there is nothing to check

        if (StringUtil.isEmpty(origAttrList)) {
            return false;
        }

        // if the check attribute list is empty then it's a failure
        // since we know that our original attr is not empty

        if (StringUtil.isEmpty(checkAttrList)) {
            return true;
        }

        // we'll just compare the values as is in case there
        // is a match and no further processing is necessary

        if (origAttrList.equals(checkAttrList)) {
            return false;
        }

        // we need to tokenize our attr values and compare. we want to
        // make sure all original attribute values are present in the check list

        Set<String> checkValues = new HashSet<>(Arrays.asList(checkAttrList.split(",")));
        for (String attr : origAttrList.split(",")) {
            if (!checkValues.contains(attr)) {
                return true;
            }
        }

        return false;
    }

}