-
-
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
func SettingsChangeVisibilityPost(ctx *context.Context) { | ||
visibility := structs.VisibilityModes[ctx.FormString("visibility")] | ||
if !visibility.IsValid() { | ||
ctx.JSONError(ctx.Tr("org.settings.invalid_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.
End users would never see such error message, so please re-use the existing invalid_data
tranlsation
} | ||
|
||
if ctx.Org.Organization.Visibility == visibility { | ||
ctx.JSONError(ctx.Tr("org.settings.change_visibility_no_change")) |
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.
It shouldn't be an "error". It can just flash a info or success message.
And there can be a general message that "You did not make any changes"
Uh oh!
There was an error while loading. Please reload this page.