mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-23 09:30:50 +00:00
Remove unnecessary attributes of User struct (#17745)
* Remove unnecessary functions of User struct * Move more database methods out of user struct * Move more database methods out of user struct * Fix template failure * Fix bug * Remove finished FIXME * remove unnecessary code
This commit is contained in:
parent
c2ab19888f
commit
baed01f247
42 changed files with 279 additions and 451 deletions
|
@ -117,6 +117,10 @@ func HandleOrgAssignment(ctx *Context, args ...bool) {
|
|||
}
|
||||
ctx.Data["IsOrganizationOwner"] = ctx.Org.IsOwner
|
||||
ctx.Data["IsOrganizationMember"] = ctx.Org.IsMember
|
||||
ctx.Data["IsPublicMember"] = func(uid int64) bool {
|
||||
is, _ := models.IsPublicMembership(ctx.Org.Organization.ID, uid)
|
||||
return is
|
||||
}
|
||||
ctx.Data["CanCreateOrgRepo"] = ctx.Org.CanCreateOrgRepo
|
||||
|
||||
ctx.Org.OrgLink = org.AsUser().OrganisationLink()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue