jpdevries / QuickBar

MODX Revolution Add-on that adds an Evo style hover bar to the top of your site for quick editing. Only for users that are logged into the Manager of course.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quickbar not visible for for logged-in editors

Lefthandmedia opened this issue · comments

Hi,
My content editor is logged-in and has permission to edit_document.
The Quickbar does not appear in the frontend.
What other permissions are needed to have Quickbar appear?

Quickbar 1.0.4pl , MODX 2.3.3-pl

RDG

@Lefthandmedia are you including the [[!Quickbar]] snippet in your template?

yes i do.
since the snippet also checks $modx->hasPermission('edit_document') the usergroup 'editors' also needs permission to the WEB context with the content_editors ACL.
Before 1.0.4-pl only permitted acces to the manager was needed. a note in the RTFM could be useful

I see. I'll add a note. Also need to add setup instructions to README. 


Sent from Mailbox

On Mon, Jun 15, 2015 at 2:08 PM, Lefthandmedia notifications@github.com
wrote:

yes i do.
since the snippet also checks $modx->hasPermission('edit_document') the usergroup 'editors' also needs permission to the WEB context with the content_editors ACL.

Before 1.0.4-pl only permitted acces to the manager was needed. a note in the RTFM could be useful

Reply to this email directly or view it on GitHub:
#15 (comment)

I'm getting this problem with MODX 2.4.1. My user does have the edit_document permission checked but he is unable to see the QuickBar appear. It appears for me when I log in with full permission, but not for the client. Fortunately I tested before letting him know about this great way of being able to quickly find his resources in the back end from the front end....

And I can confirm that the client has 'mgr' access and the edit_document permission checked. The cache has been cleared, and the snippet is in place :)

@crimsonpixel hm, I assume if you duplicate the user and give it sudo access it shows up then? If so, it would definitely be permissions related. The permissions check is pretty simple, so I'm not sure if this is a QuickBar bug or a MODX 2.4 bug.

Have you ensured the user also has permission to the WEB context with the content_editors ACL as @Lefthandmedia pointed out?

if (!$modx->user->hasSessionContext('mgr') || !$modx->hasPermission('edit_document') ) return '';

Yeah if I make the user a sudo user then he can see the QuickBar., as soon as this is removed then it is no longer visible. The user has both WEB and MGR access and has all the permssions (and more) than the content_editors ACL.

@crimsonpixel good to know, thanks for checking. I'll try and 🐛 one of the MODX integrators to look into if this could be a MODX bug. I assume if is returning false for $modx->hasPermission('edit_document') when it should be returning true.

@crimsonpixel if possible let me know if this is reproducible in 2.4.2. I still haven't found anymore about if there are known issues with hasPermission but hoping the issue may have been patched recently

Same problem here. I am using MODX 2.4.3-pl with latest QuickBar.

When logged in on backend and viewing resource in frontend the bar is visible. When logged in on frontend with Login snippet no bar is visible.

User is member of group having access rights for mgr and web as Super User - 0 with role having edit_document access.

Could it be a problem with the hasSession check, because the session is created from the frontend (web) and not the backend (mgr)?

You have to attach web context access for your User Groups to get this working. We usually only attach it to mgr context, but as QuickBar is running inside web context, your user has to have edit_document permission in web context as well. To verify, check Administrator User Group.

image

So, its NOT a bug. 👍

Thanks @zaigham. Closing. Please reopen if anyone feels necessary.