-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 new team #18212
Fix new team #18212
Conversation
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 have a feeling we should simplify this and remove the MaxPerm thing as it appears kinda confusing. however this is a good bug fix.
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.
as per above. check the inverse or otherwise make sure
- unset
unit.Type
doesn't grant admin access - later added values of
unit.Type
don't grant admin access
edit: tbh, I didn't thoroughly check the broader context of that code, it just seems like the func can easily be used in other contexts where assumptions don't hold. So maybe it's not that dangerous.
This function will return the max permission that this unit could be assigned to. It's not about the real permission. It's just a convenient to let UI know about how to show the unit. |
As I said in my approving comment I think this is fairly badly named and we should really rename this - but for the moment this is a reasonable bug fix. |
We can leave more comments here, and it won't confuse developers in future, and we can leave a TODO here to tell all readers how to continue to improve. |
* 'main' of https://github.com/go-gitea/gitea: Fix typos in docs/content (go-gitea#18215) [skip ci] Updated licenses and gitignores In the Organization member page, 2fa column is too narrow for Simplified Chinese and Chinese Traditional. (go-gitea#18213) Fix new team (go-gitea#18212)
fix regression from go-gitea#17811
Fix bug caused by #17811