mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-04 09:24:36 -04:00
work on #1961
This commit is contained in:
parent
c9b65f0fdc
commit
134d8e7681
10 changed files with 47 additions and 24 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue