Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit pen only visible when logged in as admin #23

Closed
poVoq opened this issue Mar 13, 2024 · 10 comments
Closed

Edit pen only visible when logged in as admin #23

poVoq opened this issue Mar 13, 2024 · 10 comments

Comments

@poVoq
Copy link

poVoq commented Mar 13, 2024

The little edit pen in the top right corner of a page to enter the edit mode seems to be only visible when you are logged in as an Dokuwiki admin.

When I set ACL to allow editing certain pages by other groups, this works fine on the default theme and I can edit pages as expected by adding ?do=edit to the URL of that page, but the little edit button stays hidden for these non-admin users.

Thanks for looking into this.

@nicolasprigent
Copy link
Owner

Yes I've put the condition to be only on admin. I'll make an update to have the condition relying on ACL authorisation.

@nicolasprigent
Copy link
Owner

I'm sorry, I've tested on my side but it works., I can't reproduce what you have. When my test user is on "Read" but belongs to a group that has "edit" I see the pencil icon ?
image
Can you share your ACL configuration ?

@poVoq
Copy link
Author

poVoq commented Mar 14, 2024

I am getting users via AuthPDO from an external database and the ACL includes an wildcard placeholder like this:

grafik

I got the idea how to do it from here and it works with the default theme: https://forum.dokuwiki.org/d/22109-automatic-namespaces-and-acl-for-authpdo-derived-groups

Maybe the easiest would be to just always show the edit pen?

@nicolasprigent
Copy link
Owner

That sounds really specific. Does this link still works ?
image

@poVoq
Copy link
Author

poVoq commented Mar 15, 2024

Yes that link seems to work as expected.

@poVoq
Copy link
Author

poVoq commented Mar 22, 2024

I assume if I change this line to:

if ((auth_quickaclcheck($USERINFO['id']) >= AUTH_READ) && $action == 'show'){

or so, it will always show the pen icon?

Edit: not that doesn't work.

It would be really nice if this wasn't hidden, especially for editing the side menu.

@nicolasprigent
Copy link
Owner

Sorry for late reply, I'll try to find some fix, that's a tricky one because I don't have the same environnement than yours to test. As soon as I get some free time.

@nicolasprigent
Copy link
Owner

Since the edit page button was working as you wanted, I've made a refactor of my edit button code, so now it uses the same dokuwiki classes that is used for the classic menu items. Let me know if that gives you the desired result on your install.

@poVoq
Copy link
Author

poVoq commented May 13, 2024

Thanks!

It appears to be always visible now, which is fine with me.

@poVoq poVoq closed this as completed May 13, 2024
@nicolasprigent
Copy link
Owner

Great !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants