mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Identity: remove GetTypedID (#91745)
This commit is contained in:
@@ -191,15 +191,13 @@ func (hs *HTTPServer) setDefaultFolderPermissions(ctx context.Context, orgID int
|
||||
if !hs.Cfg.RBAC.PermissionsOnCreation("folder") {
|
||||
return nil
|
||||
}
|
||||
var permissions []accesscontrol.SetResourcePermissionCommand
|
||||
var userID int64
|
||||
|
||||
namespace, id := user.GetTypedID()
|
||||
if namespace == identity.TypeUser {
|
||||
var errID error
|
||||
userID, errID = identity.IntIdentifier(namespace, id)
|
||||
if errID != nil {
|
||||
return errID
|
||||
var permissions []accesscontrol.SetResourcePermissionCommand
|
||||
|
||||
if identity.IsIdentityType(user.GetID(), identity.TypeUser) {
|
||||
userID, err := identity.UserIdentifier(user.GetID())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
permissions = append(permissions, accesscontrol.SetResourcePermissionCommand{
|
||||
|
||||
Reference in New Issue
Block a user