Identity: remove GetTypedID (#91745)
(cherry picked from commit bcfb66b416)
This commit is contained in:
@@ -165,10 +165,9 @@ func (f *accessControlDashboardPermissionFilter) buildClauses() {
|
||||
dashWildcards := accesscontrol.WildcardsFromPrefix(dashboards.ScopeDashboardsPrefix)
|
||||
folderWildcards := accesscontrol.WildcardsFromPrefix(dashboards.ScopeFoldersPrefix)
|
||||
|
||||
userID := int64(0)
|
||||
namespace, identifier := f.user.GetTypedID()
|
||||
if namespace == identity.TypeUser || namespace == identity.TypeServiceAccount {
|
||||
userID, _ = identity.IntIdentifier(namespace, identifier)
|
||||
var userID int64
|
||||
if id, err := identity.UserIdentifier(f.user.GetID()); err == nil {
|
||||
userID = id
|
||||
}
|
||||
|
||||
orgID := f.user.GetOrgID()
|
||||
|
||||
@@ -33,10 +33,9 @@ func (f *accessControlDashboardPermissionFilterNoFolderSubquery) buildClauses()
|
||||
dashWildcards := accesscontrol.WildcardsFromPrefix(dashboards.ScopeDashboardsPrefix)
|
||||
folderWildcards := accesscontrol.WildcardsFromPrefix(dashboards.ScopeFoldersPrefix)
|
||||
|
||||
userID := int64(0)
|
||||
namespace, identifier := f.user.GetTypedID()
|
||||
if namespace == identity.TypeUser || namespace == identity.TypeServiceAccount {
|
||||
userID, _ = identity.IntIdentifier(namespace, identifier)
|
||||
var userID int64
|
||||
if id, err := identity.UserIdentifier(f.user.GetID()); err == nil {
|
||||
userID = id
|
||||
}
|
||||
|
||||
orgID := f.user.GetOrgID()
|
||||
|
||||
Reference in New Issue
Block a user