1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-19 16:58:37 +00:00
This commit is contained in:
Unknwon
2015-11-16 10:14:12 -05:00
parent c9b65f0fdc
commit 134d8e7681
10 changed files with 47 additions and 24 deletions

View File

@@ -109,6 +109,12 @@ func (u *User) AfterSet(colName string, _ xorm.Cell) {
}
}
// HasForkedRepo checks if user has already forked a repository with given ID.
func (u *User) HasForkedRepo(repoID int64) bool {
_, has := HasForkedRepo(u.Id, repoID)
return has
}
// CanEditGitHook returns true if user can edit Git hooks.
func (u *User) CanEditGitHook() bool {
return u.IsAdmin || u.AllowGitHook