Below are answers to a few frequently asked GitLab licensing questions:
Do blocked users count towards my license?
Blocked users do not count towards your active user count. You can verify this via the Rails console on the GitLab server:
# Open the Rails console. May take a few minutes to load
sudo gitlab-rails console
# Get active user count
User.active.count
# Get total user count
User.count
# See which users are inactive (and don't consume a license slot)
(User.all - User.active).map(&:username)
In the output of that last command, you’ll see blocked users, a support-bot user
, and a ghost
user. (see below for more on ghost user)
What’s the best way to delete a user?
If you do not want to block a user, you have two options to delete them. There is a Delete user option that will move certain contributions to a system-wide Ghost user account. This is explained in detail here. Then there is a Delete user and contributions options which removes absolutely everything associated with that user.
What should I do when an employee leaves the company?
You can choose to either block the user or use one of the delete options described above. All of these options free up a license slot to be used for the next user created.
I think the key here is to understand that if you add a new user today your license count goes up by one. If you then delete or block another user tomorrow, your active user count goes down but your historical maximum user count will not go down. GitLab uses a true-up license model. An example of that from our FAQ page
If you have 100 active users today, you should purchase a 100 user subscription. Suppose that when you renew next year you have 300 active users (200 extra users). When you renew you pay for a 300 user subscription and you also pay the full annual fee for the 200 users that you added during the year.
If it’s at all possible, you should block or delete unused user accounts before adding a new user. This will free up a license slot and prevent your historical maximum user count from going up. Under the true-up model, you’d have to pay for any users you added during the year at renewal time so keeping your historical maximum user count in check is crucial.