mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
Fix #1393 allow adding module admin by email address
This commit is contained in:
parent
09c48abee9
commit
5e9d9ef02f
7 changed files with 32 additions and 23 deletions
|
|
@ -283,6 +283,10 @@ class moduleAdminController extends module
|
|||
$columnList = array('module_srl', 'module');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl, $columnList);
|
||||
if(!$module_info) throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
|
||||
$oDB = DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
// Register Admin ID
|
||||
$oModuleController->deleteAdminId($module_srl);
|
||||
$admin_member = Context::get('admin_member');
|
||||
|
|
@ -296,11 +300,10 @@ class moduleAdminController extends module
|
|||
$oModuleController->insertAdminId($module_srl, $admin_id);
|
||||
}
|
||||
}
|
||||
|
||||
// List permissions
|
||||
$xml_info = $oModuleModel->getModuleActionXML($module_info->module);
|
||||
|
||||
$grant_list = $xml_info->grant;
|
||||
|
||||
$grant_list->access = new stdClass();
|
||||
$grant_list->access->default = 'guest';
|
||||
$grant_list->manager = new stdClass();
|
||||
|
|
@ -353,6 +356,8 @@ class moduleAdminController extends module
|
|||
}
|
||||
}
|
||||
|
||||
$oDB->commit();
|
||||
|
||||
Rhymix\Framework\Cache::delete("site_and_module:module_grants:$module_srl");
|
||||
$this->setMessage('success_registed');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue