set user as admin gitlab
# 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
Are there any code examples left?
New code examples in category Shell/Bash
-
Shell/Bash 2022-03-28 00:30:33 wise highlight ubuntu
-
Shell/Bash 2022-03-28 00:25:19 how to send a pull request in git
-
Shell/Bash 2022-03-27 23:55:06 how to open terminal in sublime text ubuntu
-
Shell/Bash 2022-03-27 23:25:19 how to switch branch
-
Shell/Bash 2022-03-27 23:20:25 python
-
Shell/Bash 2022-03-27 23:10:09 apache2 mod_jk proxy to tomcat connector
-
Shell/Bash 2022-03-27 22:35:12 chown
-
Shell/Bash 2022-03-27 22:15:08 awk last match