Access: Remove split scopes feature toggle (#81874)
* remove split scopes FT
* Revert "remove split scopes FT"
This reverts commit 349fb081d3.
* make toggle deprecated instead
* fix gen
This commit is contained in:
@@ -50,14 +50,12 @@ func ProvideService(cfg *setting.Cfg, db db.DB, routeRegister routing.RouteRegis
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if features.IsEnabledGlobally(featuremgmt.FlagSplitScopes) {
|
||||
// Migrating scopes that haven't been split yet to have kind, attribute and identifier in the DB
|
||||
// This will be removed once we've:
|
||||
// 1) removed the feature toggle and
|
||||
// 2) have released enough versions not to support a version without split scopes
|
||||
if err := migrator.MigrateScopeSplit(db, service.log); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// Migrating scopes that haven't been split yet to have kind, attribute and identifier in the DB
|
||||
// This will be removed once we've:
|
||||
// 1) removed the feature toggle and
|
||||
// 2) have released enough versions not to support a version without split scopes
|
||||
if err := migrator.MigrateScopeSplit(db, service.log); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return service, nil
|
||||
|
||||
@@ -667,9 +667,7 @@ func (s *store) createPermissions(sess *db.Session, roleID int64, resource, reso
|
||||
p.RoleID = roleID
|
||||
p.Created = time.Now()
|
||||
p.Updated = time.Now()
|
||||
if s.features.IsEnabledGlobally(featuremgmt.FlagSplitScopes) {
|
||||
p.Kind, p.Attribute, p.Identifier = p.SplitScope()
|
||||
}
|
||||
p.Kind, p.Attribute, p.Identifier = p.SplitScope()
|
||||
permissions = append(permissions, p)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user