package com.monkeylessey.framework.service;//package com.monkeylessey.sys.service;
|
//
|
//import org.springframework.security.access.PermissionEvaluator;
|
//import org.springframework.security.core.Authentication;
|
//import org.springframework.security.core.GrantedAuthority;
|
//import org.springframework.stereotype.Component;
|
//
|
//import java.io.Serializable;
|
//import java.util.Collection;
|
//
|
///**
|
// * @author 29443
|
// * @date 2022/6/3
|
// */
|
////@Component
|
//public class Permissions implements PermissionEvaluator {
|
// @Override
|
// public boolean hasPermission(Authentication authentication, Object targetDomainObject, Object permission) {
|
// Collection<? extends GrantedAuthority> authorities = authentication.getAuthorities();
|
// System.out.println(authorities);
|
// System.out.println(permission);
|
// System.out.println(targetDomainObject);
|
// return true;
|
// }
|
//
|
// @Override
|
// public boolean hasPermission(Authentication authentication, Serializable targetId, String targetType, Object permission) {
|
// return false;
|
// }
|
//}
|