KN4CK3R
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
8 additions and
8 deletions
-
routers/repo/migrate.go
-
routers/repo/setting.go
|
|
@ -153,12 +153,12 @@ func MigratePost(ctx *context.Context) { |
|
|
|
case addrErr.IsURLError: |
|
|
|
ctx.RenderWithErr(ctx.Tr("form.url_error"), tpl, &form) |
|
|
|
case addrErr.IsPermissionDenied: |
|
|
|
if len(addrErr.PrivateNet) == 0 { |
|
|
|
ctx.RenderWithErr(ctx.Tr("repo.migrate.permission_denied_private_ip"), tpl, &form) |
|
|
|
} else if !addrErr.LocalPath { |
|
|
|
if addrErr.LocalPath { |
|
|
|
ctx.RenderWithErr(ctx.Tr("repo.migrate.permission_denied"), tpl, &form) |
|
|
|
} else if len(addrErr.PrivateNet) == 0 { |
|
|
|
ctx.RenderWithErr(ctx.Tr("repo.migrate.permission_denied_blocked"), tpl, &form) |
|
|
|
} else { |
|
|
|
ctx.RenderWithErr(ctx.Tr("repo.migrate.permission_denied"), tpl, &form) |
|
|
|
ctx.RenderWithErr(ctx.Tr("repo.migrate.permission_denied_private_ip"), tpl, &form) |
|
|
|
} |
|
|
|
case addrErr.IsInvalidPath: |
|
|
|
ctx.RenderWithErr(ctx.Tr("repo.migrate.invalid_local_path"), tpl, &form) |
|
|
|
|
|
@ -178,12 +178,12 @@ func SettingsPost(ctx *context.Context) { |
|
|
|
case addrErr.IsURLError: |
|
|
|
ctx.RenderWithErr(ctx.Tr("form.url_error"), tplSettingsOptions, &form) |
|
|
|
case addrErr.IsPermissionDenied: |
|
|
|
if len(addrErr.PrivateNet) == 0 { |
|
|
|
ctx.RenderWithErr(ctx.Tr("repo.migrate.permission_denied_private_ip"), tplSettingsOptions, &form) |
|
|
|
} else if !addrErr.LocalPath { |
|
|
|
if addrErr.LocalPath { |
|
|
|
ctx.RenderWithErr(ctx.Tr("repo.migrate.permission_denied"), tplSettingsOptions, &form) |
|
|
|
} else if len(addrErr.PrivateNet) == 0 { |
|
|
|
ctx.RenderWithErr(ctx.Tr("repo.migrate.permission_denied_blocked"), tplSettingsOptions, &form) |
|
|
|
} else { |
|
|
|
ctx.RenderWithErr(ctx.Tr("repo.migrate.permission_denied"), tplSettingsOptions, &form) |
|
|
|
ctx.RenderWithErr(ctx.Tr("repo.migrate.permission_denied_private_ip"), tplSettingsOptions, &form) |
|
|
|
} |
|
|
|
case addrErr.IsInvalidPath: |
|
|
|
ctx.RenderWithErr(ctx.Tr("repo.migrate.invalid_local_path"), tplSettingsOptions, &form) |
|
|
|