Add object.IsAppUser()

This commit is contained in:
Yang Luo
2024-04-24 01:10:38 +08:00
parent 90d502ab2b
commit af2d26daf2
7 changed files with 15 additions and 8 deletions

View File

@ -464,3 +464,10 @@ func (user *User) IsAdminUser() bool {
return user.IsAdmin || user.IsGlobalAdmin()
}
func IsAppUser(userId string) bool {
if strings.HasPrefix(userId, "app/") {
return true
}
return false
}