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

com.yahoo.elide.security.checks.prefab.Role Maven / Gradle / Ivy

There is a newer version: 4.8.0
Show newest version
/*
 * Copyright 2016, Yahoo Inc.
 * Licensed under the Apache License, Version 2.0
 * See LICENSE file in project root for terms.
 */
package com.yahoo.elide.security.checks.prefab;

import com.yahoo.elide.security.User;
import com.yahoo.elide.security.checks.UserCheck;

/**
 * Simple checks to always grant or deny.
 */
public class Role {
    /**
     * Check which always grants.
     */
    public static class ALL extends UserCheck {
        @Override
        public boolean ok(User user) {
            return true;
        }
    }

    /**
     * Check which always denies.
     */
    public static class NONE extends UserCheck {
        @Override
        public boolean ok(User user) {
            return false;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy