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

com.github.houbb.privilege.proxy.support.own.PrivilegeOwnSubject Maven / Gradle / Ivy

package com.github.houbb.privilege.proxy.support.own;

import com.github.houbb.heaven.annotation.ThreadSafe;
import com.github.houbb.privilege.api.api.IPrivilegeInfo;
import com.github.houbb.privilege.api.api.IPrivilegeOwn;
import com.github.houbb.privilege.proxy.support.subject.ISubject;
import com.github.houbb.privilege.proxy.support.subject.SubjectUtils;

import java.util.List;

/**
 * 当前用户拥有的权限
 *
 * @author binbin.hou
 * @since 0.0.4
 */
@ThreadSafe
public class PrivilegeOwnSubject implements IPrivilegeOwn {

    @Override
    public List ownPrivilege() {
        ISubject subject = SubjectUtils.getOrDefault();
        return subject.privileges();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy