diff --git a/constants.go b/constants.go index c82fb14643b..7a621f170e4 100644 --- a/constants.go +++ b/constants.go @@ -696,10 +696,6 @@ const ( // SCP is Secure Copy. const SCP = "scp" -// AdminRoleName is the name of the default admin role for all local users if -// another role is not explicitly assigned -const AdminRoleName = "admin" - const ( // PresetEditorRoleName is a name of a preset role that allows // editing cluster configuration. diff --git a/lib/auth/auth_with_roles.go b/lib/auth/auth_with_roles.go index d51b3ec60d4..670ed249459 100644 --- a/lib/auth/auth_with_roles.go +++ b/lib/auth/auth_with_roles.go @@ -5875,14 +5875,6 @@ func (a *ServerWithRoles) DeleteRole(ctx context.Context, name string) error { return trace.Wrap(err) } - // DELETE IN (7.0) - // It's OK to delete this code alongside migrateOSS code in auth. - // It prevents 6.0 from migrating resources multiple times - // and the role is used for `tctl users add` code too. - if a.authServer.modules.IsOSSBuild() && name == teleport.AdminRoleName { - return trace.AccessDenied("can not delete system role %q", name) - } - return a.authServer.DeleteRole(ctx, name) }