summaryrefslogtreecommitdiffstats
path: root/routers/repo/setting.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-07-24 01:08:22 +0800
committerUnknwon <u@gogs.io>2016-07-24 01:08:22 +0800
commit1f2e173a745da8e4b57f96b5561a3c10054d3b76 (patch)
tree367f0f07e4fe1269ac0772e0561a4bf912b5153c /routers/repo/setting.go
parent46e96c008cf966428c9dad71c7871de88186e3fe (diff)
downloadgitea-1f2e173a745da8e4b57f96b5561a3c10054d3b76.tar.gz
gitea-1f2e173a745da8e4b57f96b5561a3c10054d3b76.zip
Refactor User.Id to User.ID
Diffstat (limited to 'routers/repo/setting.go')
-rw-r--r--routers/repo/setting.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/routers/repo/setting.go b/routers/repo/setting.go
index c5772dca52..08f06dcb30 100644
--- a/routers/repo/setting.go
+++ b/routers/repo/setting.go
@@ -162,7 +162,7 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
}
if ctx.Repo.Owner.IsOrganization() {
- if !ctx.Repo.Owner.IsOwnedBy(ctx.User.Id) {
+ if !ctx.Repo.Owner.IsOwnedBy(ctx.User.ID) {
ctx.Error(404)
return
}
@@ -196,7 +196,7 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
}
if ctx.Repo.Owner.IsOrganization() {
- if !ctx.Repo.Owner.IsOwnedBy(ctx.User.Id) {
+ if !ctx.Repo.Owner.IsOwnedBy(ctx.User.ID) {
ctx.Error(404)
return
}
@@ -235,13 +235,13 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
}
if ctx.Repo.Owner.IsOrganization() {
- if !ctx.Repo.Owner.IsOwnedBy(ctx.User.Id) {
+ if !ctx.Repo.Owner.IsOwnedBy(ctx.User.ID) {
ctx.Error(404)
return
}
}
- if err := models.DeleteRepository(ctx.Repo.Owner.Id, repo.ID); err != nil {
+ if err := models.DeleteRepository(ctx.Repo.Owner.ID, repo.ID); err != nil {
ctx.Handle(500, "DeleteRepository", err)
return
}
@@ -261,7 +261,7 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
}
if ctx.Repo.Owner.IsOrganization() {
- if !ctx.Repo.Owner.IsOwnedBy(ctx.User.Id) {
+ if !ctx.Repo.Owner.IsOwnedBy(ctx.User.ID) {
ctx.Error(404)
return
}
@@ -321,7 +321,7 @@ func CollaborationPost(ctx *context.Context) {
}
// Check if user is organization member.
- if ctx.Repo.Owner.IsOrganization() && ctx.Repo.Owner.IsOrgMember(u.Id) {
+ if ctx.Repo.Owner.IsOrganization() && ctx.Repo.Owner.IsOrgMember(u.ID) {
ctx.Flash.Info(ctx.Tr("repo.settings.user_is_org_member"))
ctx.Redirect(ctx.Repo.RepoLink + "/settings/collaboration")
return
@@ -371,7 +371,7 @@ func parseOwnerAndRepo(ctx *context.Context) (*models.User, *models.Repository)
return nil, nil
}
- repo, err := models.GetRepositoryByName(owner.Id, ctx.Params(":reponame"))
+ repo, err := models.GetRepositoryByName(owner.ID, ctx.Params(":reponame"))
if err != nil {
if models.IsErrRepoNotExist(err) {
ctx.Handle(404, "GetRepositoryByName", err)