It is always returning false for me in a snippet in the front end, even when I’m sure the user has the permission.
if ($modx->hasPermission('create')) {
return "Has Permission";
} else {
return "No Permission";
}
-
MODX Staff
- 10,725 Posts
It’s working fine here for me. They have to have the permission assigned in the current context and be logged-in to that context, obviously.
Quote from: OpenGeek at Feb 07, 2010, 10:03 AM
It’s working fine here for me. They have to have the permission assigned in the current context and be logged-in to that context, obviously.
Doh... It’s working fine for me too, now that I’ve restored the ’web’ Context Access ACL entry for them.
-
MODX Staff
- 10,725 Posts
It’s not a method of the user because in the future determining if a user has permission depends on all of their group memberships, and could potentially also be determined for a group itself, instead of for a user. Users are only one class of principal to which permissions can be assigned in the MODx schema.