Feature #12168

Add option to hide login button to Admin options

Added by Dan Gillean 7 months ago. Updated 6 months ago.

Status:VerifiedStart date:04/25/2018
Priority:MediumDue date:
Assignee:-% Done:

0%

Category:Usability
Target version:Release 2.5.0
Google Code Legacy ID: Tested version:
Sponsored:No Requires documentation:Yes

Description

Our community of users have requested the ability to be able to hide the login button for public users on a fairly regular basis. Right now doing so (without disabling login entirely, as was added in issue #7913) requires manually altering the Dominion theme by adding the following to plugins/arDominionPlugin/css/less/header.less:

#user-menu {
  display: none;
}

Note: after, users should recompile the CSS for the Dominion theme, clear the cache, and restart PHP-FPM and memcached:

make -C plugins/arDominionPlugin
php symfony cc
sudo systemctl restart php7.0-fpm
sudo systemctl restart memcached

Additionally, editing and/or deleting the login, logout, and myProfile links via Admin > Menus does nothing - these stay visible even when the menu elements are deleted and modifications to the display labels via the Menus module have no effect, meaning they are likely hardcoded elsewhere. This bug has been described separately in issue #12167

Feature request

It would be much simpler if this were an option added to the settings available to an administrator. Enabling it would only hide the login button, not prevent login if users manually navigate to /user/login and enter the proper credentials. If users want to fully disable login, they can use the config setting outlined in issue #7913.

Since users may need to access the login menu once they are authenticated (to log out, or to access their profiles - important especially if the user logging in is not an admin), this behaves differently than current Default page elements. Consequently, we will add this new feature to Admin > Visible elements - it only hides the button for unauthenticated users, so this is more consistent.

Once logged in, the profile button will be visible and accessible to all authenticated users.

login-visible-elements.png (34.5 KB) Dan Gillean, 05/28/2018 09:43 AM


Related issues

Related to Access to Memory (AtoM) - Bug #12167: Deletions and/or edits to display labels on login, logout... Verified 04/25/2018

History

#1 Updated by Dan Gillean 7 months ago

  • Related to Bug #12167: Deletions and/or edits to display labels on login, logout, and myProfile menu nodes have no effect added

#2 Updated by Mike Cantelon 6 months ago

  • Status changed from New to In progress
  • Assignee set to Mike Cantelon

#3 Updated by Mike Cantelon 6 months ago

  • Status changed from In progress to Code Review
  • Assignee changed from Mike Cantelon to Nick Wilkinson

#4 Updated by José Raddaoui Marín 6 months ago

  • Status changed from Code Review to Feedback
  • Assignee changed from Nick Wilkinson to Mike Cantelon

#5 Updated by Mike Cantelon 6 months ago

  • Status changed from Feedback to QA/Review
  • Assignee changed from Mike Cantelon to Dan Gillean

Thanks Radda!

Merged to qa/2.5.x for QA.

#6 Updated by Dan Gillean 6 months ago

  • Project changed from AtoM Wishlist to Access to Memory (AtoM)
  • Category set to Usability
  • Target version set to Release 2.5.0
  • Requires documentation set to Yes

#7 Updated by Dan Gillean 6 months ago

  • Subject changed from Add option to hide login button to Admin > Settings > Default page elements to Add option to hide login button to Admin options
  • Description updated (diff)
  • Status changed from QA/Review to Verified
  • Assignee deleted (Dan Gillean)

Hi Mike!

I see you've implemented this in the Visible elements module instead of Admin > Settings > Default page elements. At first I was confused, but I realize now after testing why you've done this - it is useful to have the login button remain visible after users are authenticated, so users can easily log out, and/or access their profile. Since Default page elements currently tends to hide things for all users, I think this is in fact a better solution.

Seems to work well! I've updated the title and description for this issue a bit so it doesn't mention Default page elements.

#9 Updated by Mike Cantelon 6 months ago

Thanks Dan!

Also available in: Atom PDF