Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the default theme for users in GitLab

Is it possible to set the default theme for users in GitLab? Looking in the gitlab/gitlab.yaml I see no options to set a default.

enter image description here


Looking in the database, I see that there is a color_scheme_id. I'd rather not edit the database for every user.

    mysql> select id, name, theme_id, color_scheme_id from users;

+----+-------------------+----------+-----------------+
| id | name              | theme_id | color_scheme_id |
+----+-------------------+----------+-----------------+
|  1 | Administrator     |        1 |               1 |
|  2 | foo foo           |        4 |               4 |
|  3 | bar bar           |        2 |               1 |
|  4 | foobar foobar     |        2 |               1 |
+----+-------------------+----------+-----------------+
4 rows in set (0.00 sec)
like image 654
spuder Avatar asked Sep 17 '13 19:09

spuder


1 Answers

There is a pull request in progress for that: PR 5116, by Izaak (John) Alpert -- (karlhungus).

It would add to the config/gitlab.yml.example file:

+    ## Default theme
+    ##   BASIC  = 1
+    ##   MARS   = 2
+    ##   MODERN = 3
+    ##   GRAY   = 4
+    ##   COLOR  = 5
+    # default_theme: 1 # default: 1
+ 

It just got pulled a few hours ago (Sept. 22d), so it should be part of GitLab 6.2


Update August 2018, 5 years later: the current default theme is 2 (see gitlab-org/omnibus-gitlab/files/gitlab-config-template/gitlab.rb.template.

### Default Theme
# gitlab_rails['gitlab_default_theme'] = 2
like image 81
VonC Avatar answered Nov 12 '22 13:11

VonC