Hide Staff Notices from non-Staff

AI-generated summary

The discussion revolves around hiding Staff Notices from non-staff users in Discourse. benjamin_bracken discovered that Staff Notices, intended to be visible to all users, are currently visible to non-staff — which conflicts with their use case of tagging topics with internal ticket links. Lilly clarifies that Staff Notices are meant to notify all users and suggests using Whispers instead, which can be restricted to staff via site settings. For a temporary workaround, Lilly provides CSS to hide .post-notice, though it affects all notices and can be bypassed via browser dev tools. benjamin_bracken shares a refined CSS solution targeting only custom notices and showing them only to staff: .post-notice.custom { display: none; } .staff .post-notice.custom { display: initial; }. Moin cautions that CSS hiding is insecure and recommends exploring alternative features. ToddZ notes the naming “Staff notice” is ambiguous — it could imply “notice to staff” rather than “notice from staff” — and suggests clearer labeling to prevent confusion. The group agrees the CSS fix is a stopgap until they migrate away from using Staff Notices for internal notes.

We have been using Staff Notices feature to add notes for Staff, but I’ve just found out that these are completely visible to non-Staff and that this is an intentional aspect of the feature.

Is there a way to customize our install via CSS, a plugin, or another way to hide all of these from non-Staff?

Hi @benjamin_bracken :wave: welcome to Dicsourse Meta.

I am sorry for the confusion with that feature, but you are correct, that is the intended behaviour - to notify all users of a staff message above a post.

It sounds like you have been using Staff Notices instead of Whispers. perhaps try using that feature because I think it does what you were trying to achieve. you need can make staff the whisper allowed group in your admin - all site settings.

If you really want to hide staff notices, you can use some CSS, but be aware that it can be overridden in the browser dev console.

We also use Whispers :slight_smile: I’ll poke around to figure out a way to hide these Notices, but if anyone has any CSS-y suggestions, I’m all ears!

the CSS will be something like:

.post-notice {
    display: none;
}

you may have to add the CSS for groups component and add a group conditional to the code too but staff should work without it.

but it will hide other post notices, including the welcome new user ones.

For what do you use the staff notes? Maybe there is another feature you can use instead. Hiding with CSS isn’t that safe. It’s quite easy for a user to undo these changes.

We used Staff notes for tagging a topic with a link to a ticket in our ticketing system, which we don’t want visible to non-staff.

It appears that something like the following will work for us (thank you @Lilly):

.post-notice.custom {
    display: none;
}

.staff .post-notice.custom {
    display: initial;
}

Agree that this isn’t particularly safe, just need to do something stopgap until we transition away from this usage.

The choice to label these “Staff notice” does make it pretty ambiguous: it means “Notice from Staff” but could easily be misunderstood as “Notice to Staff”. An extra word in there could head off such confusion.