I’m being asked to simplify some aspects of the Discourse interface to minimize confusion for a fairly non-techy user base.
I would like to disable some of the preference sub-tabs under the user profile:
How might I go about disabling these for non-admin users?
Thanks!
1 Like
Canapin
(Coin-coin le Canapin)
2
Hi Jeff
You could first install CSS Classes for Current User's Groups, then use the added classes to hide these elements with CSS:
body:not(.staff) {
.user-nav__preferences-security,
.user-nav__preferences-emails,
.user-nav__preferences-tracking,
.user-nav__preferences-users {
display: none !important;
}
}
Note that with this component, admins don’t have a specific class. It would require additional javascript. Staff means admins and moderators.
Also, users with basic related knowledge can circumvent such client-side modification.
3 Likes
Thank you!
That worked perfectly and also gives me a great example of how to implement user-specific changes
2 Likes
system
(system)
Closed
4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.