/admin links in sidebar should be visible only to admins

One of my theme components can accomplish this with CSS. The code for hiding a link in the (old) community section at the top for everyone except staff is, (where #{$staff_link} is the name of that link):

.sidebar-section-link-wrapper[data-list-item-name="#{$staff_link}"] {
    display: none;
 }

.staff .sidebar-section-link-wrapper[data-list-item-name="#{$staff_link}"] {
    display: block;
}

1 Like