Have the better CSS utility classes .hidden-anonymous to Hide for anonymous users and .visible-logged-in, .visible-admin to Show only for admin users

Created on 13 March 2023, over 1 year ago
Updated 29 May 2023, about 1 year ago

Problem/Motivation

In Vartheme BS4
#3043888: Have a better CSS utility classes [.hidden-anonymous] to Hide for anonymous users and [.visible-logged-in, .visible-admin] to Show only for admin users β†’

Proposed resolution

Have the same in Vartheme BS5 in general base assets.

// Hide for anonymous users.
.hidden-anonymous,
.visible-admin,
.visible-logged-in {
  display: none !important;
}

// Show only for logged in users.
body.user-logged-in {
  .visible-admin,
  .visible-logged-in,
  .hidden-anonymous {
    display: inline-block !important;
  }

  .btn {
    .visible-admin,
    .visible-logged-in,
    .hidden-anonymous {
      display: inline-block !important;
    }
  }
}

Remaining tasks

  • βœ… File an issue about this project
  • βœ… Addition/Change/Update/Fix to this project
  • βœ… Testing to ensure no regression
  • βž– Automated unit/functional testing coverage
  • βž– Developer Documentation support on feature change/addition
  • βž– User Guide Documentation support on feature change/addition
  • βœ… Accessibility and Readability
  • βœ… Code review from 1 Varbase core team member
  • βœ… Full testing and approval
  • βœ… Credit contributors
  • βœ… Review with the product owner
  • βœ… Update Release Notes and Update Helper on new feature change/addition
  • βœ… Release varbase-10.0.0-alpha1 β†’ , vartheme_bs5-3.0.0-alpha1 β†’

Varbase update type

  • βœ… No Update
  • βž– Optional Update
  • βž– Forced Update
  • βž– Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Issue #3347698 β†’ : Have the better CSS utility classes .hidden-anonymous to Hide for anonymous users and .visible-logged-in, .visible-admin to Show only for admin users
πŸ“Œ Task
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡―πŸ‡΄Jordan Rajab Natshah Jordan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024