wolfboys commented on code in PR #1883:
URL:
https://github.com/apache/incubator-streampark/pull/1883#discussion_r1002456748
##########
streampark-console/streampark-console-service/src/main/resources/mapper/system/RoleMapper.xml:
##########
@@ -32,8 +32,7 @@
select r.*
from t_role r
left join t_member m on r.role_id = m.role_id
- left join t_user u on u.user_id = m.user_id
- where u.user_id = #{userId}
+ where m.user_id = #{userId}
Review Comment:
> After check, I don't know why need to call `findUserRole`?
>
> There are two places in the code where roles are used, but I don't know
why?
>
> 1. `ShiroRealm.doGetAuthorizationInfo` ->
`simpleAuthorizationInfo.setRoles(roleSet)`
> 2. `UserServiceImpl.generateFrontendUserInfo` -> `userInfo.put("roles",
roles);`
>
> Do you know why need roles here? As I understand, front-end just needs the
`permissions` and `routers`.
hi 1996fanrui:
Currently, the `roles` is not actually used, The front-end has a
role-related instruction: `hasRole`, which is used for permission control, but
it is not currently used. Shouldn't use it in the future, so, The method and
called references can be deleted.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]