Feature #5987
openEnable a custom theme to very clearly indicate on every page that you're logged in as an Admin user
0%
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.
Files
Related issues
Updated by Eric Thomas over 14 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.
Updated by Ве Fio over 14 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...
Updated by Gareth Sylvester-Bradley over 14 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.
Updated by Gary Mueller over 14 years ago
Erics suggestion seems to be implemented as a plugin already. See #5993 for details.
Updated by Gareth Sylvester-Bradley over 14 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.
Updated by Daniel Felix over 11 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?
Updated by Daniel Felix over 11 years ago
- File Screenshot.png Screenshot.png added
- File hightlight_admin.diff hightlight_admin.diff added
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.