Add GetMaskedApplication() and GetMaskedApplications().

This commit is contained in:
Yang Luo
2021-12-29 19:12:11 +08:00
parent 377ac05928
commit 519fd655cf
3 changed files with 38 additions and 17 deletions

View File

@ -16,6 +16,7 @@ package object
import (
"fmt"
"strings"
"github.com/casbin/casdoor/util"
"xorm.io/core"
@ -407,3 +408,7 @@ func LinkUserAccount(user *User, field string, value string) bool {
func (user *User) GetId() string {
return fmt.Sprintf("%s/%s", user.Owner, user.Name)
}
func isUserIdGlobalAdmin(userId string) bool {
return strings.HasPrefix(userId, "built-in/")
}