Hide Export - not working public #1300

Closed
opened 2026-02-05 00:33:08 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @JtheBAB on GitHub (Aug 9, 2019).

Describe the bug
I added the custom header as suggested here.

When i am logged in i can't see the export button.
When i am not logged in and access a public book the export button is visible.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Activate public access
  2. Add the custom header from here
  3. Go to a page with public access
  4. You see the export button
  5. Login with a user
  6. Export button is hidden

Expected behavior
Export button is always hidden.

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): 0.26.4
  • PHP Version: 7.3
  • Hosting Method (Nginx/Apache/Docker): apache
Originally created by @JtheBAB on GitHub (Aug 9, 2019). **Describe the bug** I added the custom header as suggested [here](https://github.com/BookStackApp/BookStack/issues/1251#issuecomment-510182242). When i am logged in i can't see the export button. When i am not logged in and access a public book the export button is visible. **Steps To Reproduce** Steps to reproduce the behavior: 1. Activate public access 2. Add the custom header from [here](https://github.com/BookStackApp/BookStack/issues/1251#issuecomment-510182242) 3. Go to a page with public access 4. You see the export button 5. Login with a user 6. Export button is hidden **Expected behavior** Export button is always hidden. **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): 0.26.4 - PHP Version: 7.3 - Hosting Method (Nginx/Apache/Docker): apache
Author
Owner

@ssddanbrown commented on GitHub (Aug 14, 2019):

Hi @JtheBAB,

You could use this style rule instead:

<style>
.tri-layout-right-contents a[href$="/delete"] + hr, .tri-layout-right-contents .actions hr + .dropdown-container {display: none;}
</style>

Will cause an empty "Actions" list to be left for public viewers. Can't currently think of a way to remove that with only CSS as it stands.

I'll close this since the above has been provided and since this is technically not a supported feature.

@ssddanbrown commented on GitHub (Aug 14, 2019): Hi @JtheBAB, You could use this style rule instead: ```html <style> .tri-layout-right-contents a[href$="/delete"] + hr, .tri-layout-right-contents .actions hr + .dropdown-container {display: none;} </style> ``` Will cause an empty "Actions" list to be left for public viewers. Can't currently think of a way to remove that with only CSS as it stands. I'll close this since the above has been provided and since this is technically not a supported feature.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1300