Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 关于切换权限的问题 #457

Closed
MscZhao opened this issue May 30, 2024 · 8 comments
Closed

[Bug]: 关于切换权限的问题 #457

MscZhao opened this issue May 30, 2024 · 8 comments

Comments

@MscZhao
Copy link

MscZhao commented May 30, 2024

Software Version

ALL

Operating Environment

Windows (64)

Operating Architecture

None

Reproduce Steps

如果当前登录的是普通用户的账户,通过浏览器的Localstorage界面去修改userinfo的value中的buttos的值,例如加入超级管理员的按钮权限代码,刷新页面,普通用户就可以看到超级管理员才能看到的按钮。

What is the expected result?

建议手动刷新页面时,重新获取一次userinfo,重新写入Localstorage。

What is the actual result?

建议手动刷新页面时,重新获取一次userinfo的值, 重新写入Localstorage。

Logging (Optional)

No response

Additional Description (Optional)

No response

@Azir-11
Copy link
Member

Azir-11 commented May 30, 2024

确实是个问题,其他的储存项也可能会出现类似的问题,可以试试对本地储存加密?这样可能更彻底一点,具体的方案有待讨论,预期1.2版本会对此问题进行修复

@MscZhao
Copy link
Author

MscZhao commented May 30, 2024

好的,能否考虑一下我的建议

@Azir-11
Copy link
Member

Azir-11 commented May 30, 2024

好的,能否考虑一下我的建议

会考虑的,但是不确定是否最终选用,选择的方案也会继续在这里进行说明

@Azir-11
Copy link
Member

Azir-11 commented May 30, 2024

考虑把路由和按钮放在同一个接口中返回,在进入页面时一起更新 @honghuangdc

@limuen
Copy link

limuen commented May 30, 2024

我们以前和现在的vue和react的切换权限方案都是只要刷新,就会重新去走获取权限的接口,个人目前认为是最好的方案,存到本地刷新没去重新调接口,可能就跟上面的兄弟一样,可以看到其他角色的按钮(供参考...

@honghuangdc
Copy link
Member

可以在路由守卫加个获取用户信息的操作来解决这个问题

@honghuangdc
Copy link
Member

我先提个issues记录下

@honghuangdc
Copy link
Member

已计划 #459

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants