mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-30 18:00:02 +02:00
Fix bug when a token is given public only
Port of https://github.com/go-gitea/gitea/pull/32204 (cherry picked from commit d6d3c96e6555fc91b3e2ef21f4d8d7475564bb3e) Conflicts: routers/api/v1/api.go services/context/api.go trivial context conflicts
This commit is contained in:
parent
67549e2d94
commit
a052d2b602
11 changed files with 174 additions and 53 deletions
|
@ -421,6 +421,10 @@ func (u *User) IsIndividual() bool {
|
|||
return u.Type == UserTypeIndividual
|
||||
}
|
||||
|
||||
func (u *User) IsUser() bool {
|
||||
return u.Type == UserTypeIndividual || u.Type == UserTypeBot
|
||||
}
|
||||
|
||||
// IsBot returns whether or not the user is of type bot
|
||||
func (u *User) IsBot() bool {
|
||||
return u.Type == UserTypeBot
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue