Hello,
I'm new to MODX, I'm trying to get the hang of user groups and roles, and the whole permission system.
I have a vanilla install, and I have created an additional group
Developer, to which I assigned the default
admin user.
Access Controls clearly show that the user
admin belongs to both
Administrator and
Developer groups.
In my
TemplateBase I have the following:
Administrator: [[!+modx.user.id:memberof=`Administrator`:then=`MEMBER`:else=`NON-MEMBER`]]
Developer: [[!+modx.user.id:memberof=`Developer`:then=`MEMBER`:else=`NON-MEMBER`]]
Fake: [[!+modx.user.id:memberof=`Fake`:then=`MEMBER`:else=`NON-MEMBER`]]
Which gives the output:
Administrator: MEMBER
Developer: NON-MEMBER
Fake: NON-MEMBER
What's happening here?
I then digged into
modoutputfilter.class.php and had a confirmation:
$user->isMember('Developer')
does return FALSE.
Am I missing something?
Thank you for any help,
- m
--
MODX Revolution 2.2.14-pl (traditional)
discuss.answer
If you're previewing the front end from the Manager, your status is ambiguous. You may not be seen as a member of the Developer group until you specifically log in in the front end.
Also make sure the name of the group is not 'developer' (small d) and that you flushed permissions and flushed all sessions on the Security menu after creating the group and adding the user.
Thank you, flushing all sessions in the end did the trick.
This was ok since I'm just experimenting locally, but let's say in the future I have a community of 30000 users, and I have to assign a few administrators to a newly created group, do I really have to log out all 30k users?
--
MODX Revolution 2.2.14-pl (traditional)
I think you need to do that only if the people online need to be affected by the update. I could be wrong.
Makes sense, I'll experiment a bit maybe.
Thank you for the fast reply!
--
MODX Revolution 2.2.14-pl (traditional)
-
☆ A M B ☆
- 24,524 Posts
I always use a "test" user for this sort of thing, and use a different browser where I am not logged in as a Manager user for testing anything to do with permissions. You can get all kinds of unexpected results when testing permission-related processes when you're logged in as a Manager user.