diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2024-10-08 17:51:09 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-08 12:51:09 +0300 |
commit | d6d3c96e6555fc91b3e2ef21f4d8d7475564bb3e (patch) | |
tree | 710dd914452b0c11b39aa6cbc9f431302af0b1f9 /models/user/user.go | |
parent | d3ada91ea41b2f2eb58d637ab4c0a2dde07f20ce (diff) | |
download | gitea-d6d3c96e6555fc91b3e2ef21f4d8d7475564bb3e.tar.gz gitea-d6d3c96e6555fc91b3e2ef21f4d8d7475564bb3e.zip |
Fix bug when a token is given public only (#32204)
Diffstat (limited to 'models/user/user.go')
-rw-r--r-- | models/user/user.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/models/user/user.go b/models/user/user.go index f93fba8ae0..d5c4833cde 100644 --- a/models/user/user.go +++ b/models/user/user.go @@ -408,6 +408,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 |