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

net.shmin.auth.permission.Privilege Maven / Gradle / Ivy

There is a newer version: 2.3.1-RELEASE
Show newest version
package net.shmin.auth.permission;

import net.shmin.auth.permission.impl.LebiPermissionManagerImpl;
import net.shmin.auth.permission.model.ACLEnum;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;


/**
 * Created by benjamin on 2017/1/4.
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.TYPE})
public @interface Privilege {

    /**
     * 要访问的资源id
     *
     * @return
     */
    String[] resourceId();

    /**
     * 执行检查权限检查的类名
     */
    Class permissionValidator() default LebiPermissionManagerImpl.class;

    /**
     * 访问该资源应该具有什么权限
     */
    ACLEnum[] needed();

    /**
     * 属于哪个环境下
     * @return
     */
    String profile();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy