-
Notifications
You must be signed in to change notification settings - Fork 113
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
fix: current org is system and no preorg user logout error #4508
Conversation
} else { | ||
localStorage.removeItem(key) | ||
VueCookie.delete('X-JMS-ORG') | ||
} | ||
} | ||
|
||
export function setPreOrgLocal(username, org) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked the given snippet and found no known issue. It seems fine, with some minor changes like adding curly braces around the "localStorage" lines to keep it consistent in coding style conventions.
Here's what I suggest:
- No obvious issues were highlighted.
- Ensure that all imports are correct as per version used or consider using a different import statement according to modern JavaScript practices. (Assuming this context is from an older version of Node.js when these statements might be more common.)
- For better clarity on global functions and their usage patterns, add comments at appropriate points explaining their purpose, parameters, return value etc., if not already done (especially considering the current code).
- If you plan for any future rework or modification to the core logic, make sure to update docstrings where necessary to clearly state how they should interact with other parts of the application or system. Always maintain compatibility across different versions.
Quality Gate passedIssues Measures |
} else { | ||
localStorage.removeItem(key) | ||
VueCookie.delete('X-JMS-ORG') | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
用户退出时,当前组织为 系统组织(或自动切换的组织),并且设置 currentOrg 为 preOrg(此时 preOrg 为空时),清除本地的 currentOrg,下次登录就不是 system 组织了。否则还是 system。
复现条件:
currentOrg:admin = system
preOrg:admin 没有这个 key
用户点退出。
fix: current org is system and no preorg user logout error