|
|
@@ -1,5 +1,8 @@ |
|
|
|
package com.ningdatech.pmapi.expert.helper; |
|
|
|
|
|
|
|
import com.ningdatech.pmapi.user.entity.enumeration.RoleEnum; |
|
|
|
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails; |
|
|
|
import com.ningdatech.pmapi.user.util.LoginUserUtil; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
@@ -13,8 +16,8 @@ import org.springframework.stereotype.Component; |
|
|
|
public class PermissionCheckHelper { |
|
|
|
|
|
|
|
public boolean isSuperAdmin() { |
|
|
|
// TODO |
|
|
|
return false; |
|
|
|
UserInfoDetails details = LoginUserUtil.loginUserDetail(); |
|
|
|
return details.getUserRoleList().stream().anyMatch(w -> w.getCode().equals(RoleEnum.SUPER_ADMIN.name())); |
|
|
|
} |
|
|
|
|
|
|
|
} |