Feature #5987

Enable a custom theme to very clearly indicate on every page that you're logged in as an Admin user

Added by Gareth Sylvester-Bradley over 7 years ago. Updated over 4 years ago.

Status:NewStart date:2010-07-29
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:UI
Target version:-
Resolution:

Description

On my Redmine, I try to keep my Redmine "user" login separate from my Redmine "admin" login. Unfortunately I often make the mistake of logging in as "admin" to perform some admin task and stupidly forgetting to log out before performing some user task, so that I end up e.g. making comments on tracker issues as "Admin".

Although you can see who is logged in at the top right corner of every page "Logged in as user", it's not enough.

I would like a way to modify the theme of the whole page (e.g. change page background like the "DRAFT" background on wiki preview, or change the colour of all elements, etc.) if an admin user is logged in.

Probably, the only requirement from Redmine would be to add an HTML attribute to the top-level "body" element, so that a custom theme could pick it up.

Screenshot.png - Screenshot for Patch (21.5 KB) Daniel Felix, 2013-04-15 15:35

hightlight_admin.diff Magnifier - Highlight Admin theme (1.27 KB) Daniel Felix, 2013-04-15 15:35


Related issues

Related to Redmine - Feature #4602: User specific theme New 2010-01-18
Related to Redmine - Feature #4022: Have a css stylesheet based on the type of user New 2009-10-13

History

#1 Updated by Eric Thomas over 7 years ago

What would be better is if user could select which theme he/she wants to use.
For example, there should be a table called: themes with columns: id, name
Then in the table user_settings, there should be a column: theme_id
The rest would be self-explanatory.

#2 Updated by Ве Fio over 7 years ago

I don't want this feature. It would mess everything up for me as I am the admin user. If people really want it that bad, can't you just do something simple in the theme like put a little icon next to the "logged in as" text? Not even a major edit, and it's simple...

#3 Updated by Gareth Sylvester-Bradley over 7 years ago

Ве Fio wrote:

I don't want this feature. It would mess everything up for me as I am the admin user. If people really want it that bad, can't you just do something simple in the theme like put a little icon next to the "logged in as" text? Not even a major edit, and it's simple...

I think you misunderstood me; I wasn't asking for this to happen in the default theme. I'm asking for a change to the generated HTML so that it is possible for me to create a custom theme.

I suspect it is already possible to create a custom theme that puts a little icon next to the "logged in as" text for e.g. href="/users/1" but my whole point is that a little change in this area of the page isn't enough.

Eric Thomas wrote:

What would be better is if user could select which theme he/she wants to use.

Eric's suggestion for users to be able to select their own theme would also solve my issue as well as being nice for other users, but (I think) requires a more significant change to Redmine - a database change rather than a self-contained mod to the HTML generation code.

#4 Updated by Gary Mueller over 7 years ago

Erics suggestion seems to be implemented as a plugin already. See #5993 for details.

#5 Updated by Gareth Sylvester-Bradley over 7 years ago

Gary, thanks for that link!

I've installed that plugin, created an "Admin" theme, and selected it for the relevant Redmine accounts. That does enough for me.

Many thanks.

#6 Updated by Filou Centrinov over 4 years ago

Related Duplicate: #4022

#7 Updated by Daniel Felix over 4 years ago

Another small fix would be to change the head of the Redmine page itself. I'm currently preparing a small patch which just adds a class to the body. This will give us the ability to set some special rules in themes to highlight that the current user has admin privileges.

What do you think?

#8 Updated by Dipan Mehta over 4 years ago

+1. Nice thing to have!

#9 Updated by Daniel Felix over 4 years ago

Hi,

here is a small patch for this.

The body gets another class called "admin" which allows the user to define some admin specific theme settings.

For example see Screenshot.png.

Also available in: Atom PDF