set user as admin gitlab

C++
# Open the rails console, i.e:
sudo gitlab-rails console -e production
# Excute the follwing:

# Find user
user = User.find_by(username: 'my_username')
# Make the desired change
user.admin = true
# Save the changes
user.save!
# Exit the console
exit

# Log in/refresh page to see the changes
Source

Also in C++: