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

@ -405,8 +405,8 @@ func GetApplicationByUser(user *User) (*Application, error) {
}
func GetApplicationByUserId(userId string) (application *Application, err error) {
owner, name := util.GetOwnerAndNameFromId(userId)
if owner == "app" {
_, name := util.GetOwnerAndNameFromId(userId)
if IsAppUser(userId) {
application, err = getApplication("admin", name)
return
}