I don’t understand what you want?
- Do you want to change a manager user to a web user?
- Do you want to change a manager user to use another "role"?
Something worth mention
http://modxcms.com/forums/index.php/topic,5919.msg138629.html#msg138629
http://modxcms.com/forums/index.php?topic=36947.0
Removing locks is done in the Manager and is an administrative action so, the person removing the locks would be an admin by definition.
I guess you could write a custom snippet that would remove all locks and put that snippet on a page in the front end that only logged-in web users could access. But what’s the point of removing the locks if the person can’t access the Manager?
-
☆ A M B ☆
- 24,524 Posts
Create a role with "Use the Backup Manager" permission; this is what is checked to allow a manager user to have the Clear Locks menu item.
// Tools Menu
$toolsmenu = array();
if($modx->hasPermission('bk_manager')) {
// backup-mgr
$toolsmenu[] = '<li><a onclick="this.blur();" href="index.php?a=93" target="main">'.$_lang['bk_manager'].'</a></li>';
}
if($modx->hasPermission('bk_manager')) {
// unlock-pages
$toolsmenu[] = '<li><a onclick="this.blur();" href="javascript:removeLocks();">'.$_lang['remove_locks'].'</a></li>';
}
Cool! Susan rocks!
Further to the above, in MODx 1.0.3 (and maybe others, but this is the one I’m using now) you also need to allow that Role to ’Change the Site Settings’.
Looks like a bug to me - The Remove Locks menu item is displayed if the user can use the backup manager, but the action only works if the user has access to the configuration.
-- Tim.
-
☆ A M B ☆
- 24,524 Posts
In 1.0.4 I just created a test user, with a role that only allows resource editing and remove locks. He can remove locks just fine.
Here’s the code for removing locks:
if(!$modx->hasPermission('remove_locks')) {
$e->setError(3);
$e->dumpError();
}
There is a bug in 1.0.3:
if(!$modx->hasPermission('settings')) {
$e->setError(3);
$e->dumpError();
}
Just change that from ’settings’ to ’remove_locks’ in your manager/processors/remove_locks.processor.php file. You’ll also need to edit manager/frames/menu.php on line 316 to change the has_permission() parameter from bk_manager to remove_locks. Looks like some copy/paste that went wrong in both files