Thanks again, for joining this thread! I'll give a little twist to both your interpretations:
To be clear. I got 2 user groups (changed the names - according to the first post - to be clear):
- Component1Admins This group has access to the manager and can manage entries in a specific Component1. So they dont manage resources, and don't need access to the 'web' context.
- CustomFrontendAdmins This group has access to a custom made area (restricted by a resource group) to manage other entries.
The first group are like admins (manage multiple components), but without resource management. The 2nd group are just simple frontend users which need a simple interface.
Now
the problem is that the first group could log-in to the frontend login form, and get access, while their ACL does not contain the 'web' access. They should not get access if I understand the permissions correct. The problem is that I would not give them access, to not give them make mistakenly access to some area's.
@susan, your right it doesn't give the user mgr access, but the user get `web` access, while it shouldn't. If run this code as postHook (of login form) the code will get into the if statement;
<?php
$user = $modx->getUser();
if ($user->hasSessionContext('web')) {
echo 'What?, the mgr user can get access to the web context? weird...';
}
@bob, thanks for the number of solutions, really inspires me to get to a solution, for example #2 as pre-/postHook for the Login script. Then the `Component1Admins` will be redirected to the manager instead of loggin in the frontend restricted pages.
Actually i'm interested in the following: does my problem occur if i would put the restricted pages in a separate context? Then I create these contexts:
- mgr This is the manager
- admin This is a restricted area in the frontend where some entries can be managed easily
- web The public website
Where for each context a parrallel user group (with the context ACL) is created. Then, if a User (in the mgr user group) logs in to the frontend admin, will he be denied?
Thanks again, for your time, help and efforts!