mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-30 15:51:21 +00:00
improvements
This commit is contained in:
parent
05e5d6c568
commit
d1f1cf8a29
@ -39,10 +39,6 @@ func (vt VisibleType) IsPrivate() bool {
|
||||
return vt == VisibleTypePrivate
|
||||
}
|
||||
|
||||
func (vt VisibleType) IsValid() bool {
|
||||
return vt.String() != ""
|
||||
}
|
||||
|
||||
// VisibilityString provides the mode string of the visibility type (public, limited, private)
|
||||
func (vt VisibleType) String() string {
|
||||
for k, v := range VisibilityModes {
|
||||
|
@ -2844,7 +2844,6 @@ 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.
|
||||
settings.change_visibility_notices_1 = If the organization is converted to private, the repository stars will be removed and cannot be restored.
|
||||
settings.change_visibility_notices_2 = Non-members will lose access to the organization’s repositories if visibility is changed to private.
|
||||
settings.change_visibility_success = The visibility of organization %s has been successfully changed.
|
||||
|
@ -233,8 +233,8 @@ func SettingsRenamePost(ctx *context.Context) {
|
||||
|
||||
// SettingsChangeVisibilityPost response for change organization visibility
|
||||
func SettingsChangeVisibilityPost(ctx *context.Context) {
|
||||
visibility := structs.VisibilityModes[ctx.FormString("visibility")]
|
||||
if !visibility.IsValid() {
|
||||
visibility, ok := structs.VisibilityModes[ctx.FormString("visibility")]
|
||||
if !ok {
|
||||
ctx.Flash.Error(ctx.Tr("invalid_data", visibility))
|
||||
ctx.JSONRedirect(setting.AppSubURL + "/org/" + url.PathEscape(ctx.Org.Organization.Name) + "/settings")
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user