-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Support org/user level projects #22235
Conversation
Can we rename projects to boards? That naming is very confusing imho |
Wasn't there even a PR already for that? Something like #22237? |
Codecov Report
@@ Coverage Diff @@
## main #22235 +/- ##
=======================================
Coverage ? 47.93%
=======================================
Files ? 1047
Lines ? 143029
Branches ? 0
=======================================
Hits ? 68558
Misses ? 66279
Partials ? 8192
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
make LG-TM work |
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.
Ah… Too late again.
But still, here is what I reviewed before this PR was merged:
services/context/user.go
Outdated
} else { | ||
if ctx.ContextUser.IsOrganization() { | ||
ctx.Org.Organization = (*org_model.Organization)(ctx.ContextUser) | ||
ctx.Data["Org"] = ctx.Org.Organization | ||
} |
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.
} else { | |
if ctx.ContextUser.IsOrganization() { | |
ctx.Org.Organization = (*org_model.Organization)(ctx.ContextUser) | |
ctx.Data["Org"] = ctx.Org.Organization | |
} | |
} else if ctx.ContextUser.IsOrganization() { | |
ctx.Org.Organization = (*org_model.Organization)(ctx.ContextUser) | |
ctx.Data["Org"] = ctx.Org.Organization |
Title string `xorm:"INDEX NOT NULL"` | ||
Description string `xorm:"TEXT"` | ||
OwnerID int64 `xorm:"INDEX"` | ||
Owner *user_model.User `xorm:"-"` | ||
RepoID int64 `xorm:"INDEX"` |
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.
Title string `xorm:"INDEX NOT NULL"` | |
Description string `xorm:"TEXT"` | |
OwnerID int64 `xorm:"INDEX"` | |
Owner *user_model.User `xorm:"-"` | |
RepoID int64 `xorm:"INDEX"` | |
Title string `xorm:"INDEX UNIQUE(title_owner_repo) NOT NULL"` | |
Description string `xorm:"TEXT"` | |
OwnerID int64 `xorm:"INDEX UNIQUE(title_owner_repo)"` | |
Owner *user_model.User `xorm:"-"` | |
RepoID int64 `xorm:"INDEX UNIQUE(title_owner_repo)"` |
I think this constraint makes sense.
However, if we add it, we should probably mark this PR as breaking as it would require to rename existing duplicated titles (that should not have ever been used already)
@@ -1162,7 +1202,7 @@ func RegisterRoutes(m *web.Route) { | |||
m.Group("/projects", func() { | |||
m.Get("", repo.Projects) | |||
m.Get("/{id}", repo.ViewProject) | |||
m.Group("", func() { | |||
m.Group("", func() { //nolint:dupl |
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.
?
} else { | ||
if ctx.ContextUser.IsOrganization() { |
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.
else if
?
if teamUnit.Type != tp { | ||
continue | ||
} | ||
if teamUnit.AccessMode > maxAccess { |
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.
if teamUnit.Type != tp { | |
continue | |
} | |
if teamUnit.AccessMode > maxAccess { | |
if teamUnit.Type == tp && teamUnit.AccessMode > maxAccess { |
?
@delvh just send a pull rever to this ... |
Fix #13405