Modify global user settings

Tier: Free, Premium, Ultimate Offering: Self-managed

You can modify settings for every user in your GitLab instance.

Prerequisites

  • You must be an administrator of a self-managed GitLab instance.

Prevent users from creating top-level groups

By default, new users can create top-level groups. How you prevent users from creating top-level groups differs between new and existing users.

For new users

To prevent new users from creating top-level groups:

Linux package (Omnibus)
  1. Edit /etc/gitlab/gitlab.rb and add the following line:

    gitlab_rails['gitlab_default_can_create_group'] = false
    
  2. Reconfigure and restart GitLab.

Self-compiled (source)
  1. Edit config/gitlab.yml and uncomment the following line:

    # default_can_create_group: false  # default: true
    
  2. Restart GitLab.

For existing users

To prevent existing users from creating top-level groups, use either:

Prevent users from changing their usernames

By default, users can change their usernames. To prevent users from changing their usernames:

Linux package (Omnibus)
  1. Edit /etc/gitlab/gitlab.rb and add the following line:

    gitlab_rails['gitlab_username_changing_enabled'] = false
    
  2. Reconfigure and restart GitLab.

Self-compiled (source)
  1. Edit config/gitlab.yml and uncomment the following line:

    # username_changing_enabled: false # default: true - User can change their username/namespace
    
  2. Restart GitLab.

Prevent Guest users from promoting to a higher role

On GitLab Ultimate, Guest users do not count toward paid seats. However, when a Guest user creates projects and namespaces, they are automatically promoted to a higher role than Guest and occupy a paid seat.

To prevent Guest users from being promoted to a higher role and occupying a paid seat, set the user as external.

External users cannot create personal projects or namespaces. If a user with the Guest role is promoted into a higher role by another user, the external user setting must be removed before they can create personal projects or namespaces. For a complete list of restrictions for external users, see External users.