forked from NYANDEV/forgejo
Finish new edit team page, add member to team
This commit is contained in:
parent
e325c8499a
commit
21a1b8e5a3
24 changed files with 710 additions and 84 deletions
|
@ -54,7 +54,8 @@ type User struct {
|
|||
LoginSource int64 `xorm:"not null default 0"`
|
||||
LoginName string
|
||||
Type UserType
|
||||
Orgs []*User `xorm:"-"`
|
||||
Orgs []*User `xorm:"-"`
|
||||
Repos []*Repository `xorm:"-"`
|
||||
NumFollowers int
|
||||
NumFollowings int
|
||||
NumStars int
|
||||
|
@ -143,6 +144,12 @@ func (u *User) GetOrganizationCount() (int64, error) {
|
|||
return x.Where("uid=?", u.Id).Count(new(OrgUser))
|
||||
}
|
||||
|
||||
// GetRepositories returns all repositories that user owns, including private repositories.
|
||||
func (u *User) GetRepositories() (err error) {
|
||||
u.Repos, err = GetRepositories(u.Id, true)
|
||||
return err
|
||||
}
|
||||
|
||||
// GetOrganizations returns all organizations that user belongs to.
|
||||
func (u *User) GetOrganizations() error {
|
||||
ous, err := GetOrgUsersByUserId(u.Id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue