mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 03:00:18 +08:00
Add object.IsAppUser()
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user