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, almost 2 years ago
Updated 29 May 2023, over 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.71.5 2024