AdminLite user permissons - locked save button?

I’m having one of those days today!

So on my site, I have several client users, who have restricted access to create/edit/save resources, but can’t see the element tree and cannot install extras etc.

All working fine, but a user contacted me to say that on certain resources, there is a lock icon in place of where the save button should be.

I can see the same when i login as an adminLite user.

But as a full admin, it’s fine.

What is more strange, is that if I login as the full admin, and select a resource, and then come out of it without actually doing anything - the AdminLite user then sees a lock on the same button of that resource!

I’ve gone through the access control list but cannot figure out what it could be?

Any ideas?

I think this might just be the built-in resource locking in MODX at play.

When a user is editing a resource, other users should see a lock to avoid conflicting versions occurring.

If you go to Manage / Remove Locks [or Delete Locks in MODX 3.x] - this should clear any locks that may have got left behind.

Yes I thought the same - but the resource itself doesn’t have a lock - just the same button.
And when i Delete Locks (it is MODX3) the save button is still locked on multiple resources.

So to clarify - if another user is in a resource, the lock icon appear in the resource tree and the save button says ‘Locked by Username’ - but this isn’t happening.

The lock is only on the save button - with no user name - and no lock on the resource tree icon. Which i haven’t seen before.

I’ve now logged out all users - but still the locks are there.

OK - so to test I changed the user permissions of a user to full admin (superuser) and they still see the locked saved button on multiple resources!

What could have caused this?

The only way i can ‘unlock’ the resource save button is to change the user to ‘sudo’.
So it must be some strange permissions issue - but it’s been fine for days, and has suddenly happened.
It’s as if there’s been a security issue and the server has locked down the resources somehow?

Sounds stupid, but I can’t think what could cause this

I’ve been searching Google all evening and cannot find anything similar.

As far as I can tell, the user needs the following permissions:

  • save_document in the context (mgr)
  • save permission for the resource itself.

Thanks Harry.

What I’ve finally realised while playing around is that it’s a problem with Root level resources only.
The users cannot edit anything at root level.
I was able to create a resource at root level - and it’s in the resource tree - but if I try and edit it, the save button has a lock - even though I created it with this editor user.
Also, I cannot create a child of this page - (due to me not having permission to edit/save this resource).

I have save_document permission in the access policy, but not sure what you meant by save permission for the resource itself?

Actually there is a setting for save which is checked.
Also new_document_in_root is also checked.

Are these resources you can’t save in a resource group?

Yes they are in a resource group

Does the user group of your user have access to that resource group with an access policy that contains the save permission for the context “mgr”?

(In the user group → tab “Access Permissions” → vertical tab “Resource Groups”)

So the User Groups is Administrator (same as the top level superuser)
But the role is Editor - 10 which has the AdminLite Access policy (which has the save permission for the context ‘mgr’.

One thing I just noticed - Under Access Permission within the Administrator Access Control list, the second tab down ‘Resource Groups’, it contains my user group minimum role - Editor 10, Access Policy ‘Load, List and View’.

But under the Contexts tab, mgr, it has the Access policy of AdminLite.

I tried to change the access policy within the Resource Group, but the only options are:
(No policy)
Load only
Load, List and View

Is Load, List and View correct?

I believe you need the save permission. Try the “Resource” policy.

I changed this to ‘resource’ and the locks have disappeared!

1 Like

Thank for the steer - got there in the end.
This has driven me crazy all night - I just cannot get my head round permissions.
I think what was causing this issue was when I wanted to hide certain resources from certain users (which I created a topic about the other day).

So unfortunately now that side of things aren’t work - everyone has access to all the resources.

But I will tackle that after a good nights sleep - as I’m too tired to go there now

Thanks again for all your input - you’re a star.

See you for part two tomorrow :slight_smile: (only joking - I hope…)

Cheers A

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.