All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openl.rules.rest.SecurityChecker Maven / Gradle / Ivy

There is a newer version: 5.27.9
Show newest version
package org.openl.rules.rest;

import static org.openl.rules.security.AccessManager.isGranted;

import org.springframework.security.core.GrantedAuthority;

public final class SecurityChecker {
    private SecurityChecker() {
    }

    public static void allow(GrantedAuthority authority) {
        if (!isGranted(authority)) {
            throw new SecurityException();
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy