-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Move organization's visibility change to danger zone. #34814
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
base: main
Are you sure you want to change the base?
Conversation
…nto lunny/refactor_org_setting
options/locale/locale_en-US.ini
Outdated
@@ -2842,6 +2843,12 @@ settings.location = Location | |||
settings.permission = Permissions | |||
settings.repoadminchangeteam = Repository admin can add and remove access for teams | |||
settings.visibility = Visibility | |||
settings.change_visibility = Change Visibility | |||
settings.invalid_visibility = The new visibility is not valid. |
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.
Unused
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.
routers/web/org/setting.go
Outdated
// SettingsChangeVisibilityPost response for change organization visibility | ||
func SettingsChangeVisibilityPost(ctx *context.Context) { | ||
visibility := structs.VisibilityModes[ctx.FormString("visibility")] | ||
if !visibility.IsValid() { |
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.
IsValid
is not needed.
You can just use visibility, ok := structs.VisibilityModes[ctx.FormString("visibility")]
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.
Uh oh!
There was an error while loading. Please reload this page.