private static boolean hasPermission(User user, final AccessControlled item, final Permission p) {
        try (ACLContext c = ACL.as(user)) {
            return item.hasPermission(p);
        }
    }
Provides asserts for {@link hudson.security.Permission} checks.
@author Oleg Nenashev
integrations/src/test/java/io/jenkins/plugins/casc/PermissionAssert.java