talk
talk copied to clipboard
css class for logged in user-role
would be nice to have a css class on one of the top level containers that reflects the user's role (anon, commenter, admin, staff, etc)
usercase: this would allow to hide the tab "Comments" for anonymous users and commenters whilst leaving the menu intact for others
.user-anon .coral-tabBar,
.user-commenter .coral-tabBar {
display: none;
}
We actually already have that! That's the .coral-authenticated and .coral-unauthenticated classes.
ah, i see. the reason i could not find it is that it has been placed inside section#tabPane-COMMENTS div instead of div#app or the body.
the current solution does not allow to style/hide the main navigation section based on whether the user is logged in or not.
@wyattjoh would you please consider to re-open the issue and discuss this?
Which part of the main navigation are you attempting to style?
thanks @wyattjoh
our usecase would be to hide the main navigation for unauthenticated users (as there is only the comment tab for them anyway)
@cvle do you think we could move the .coral-authenticated and .coral-unauthenticated classes higher in the tree to accommodate this?