forked from extern/egroupware
admin_cmd_account_app bugfixes
- Fix old/new apps not properly saved for history - Fix documentation not saved
This commit is contained in:
parent
4fe4e0a553
commit
a6c1ff4f92
@ -377,7 +377,7 @@ class admin_acl
|
|||||||
)+(array)$values['admin_cmd'];
|
)+(array)$values['admin_cmd'];
|
||||||
if($location == 'run')
|
if($location == 'run')
|
||||||
{
|
{
|
||||||
$cmd = new admin_cmd_account_app($set_it,$account_id, $app);
|
$cmd = new admin_cmd_account_app($set_it,$account_id, $app, (array)$values['admin_cmd']);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -29,7 +29,7 @@ class admin_cmd_account_app extends admin_cmd
|
|||||||
* @param string|int $account =null account name or id
|
* @param string|int $account =null account name or id
|
||||||
* @param array|string $apps =null app-names
|
* @param array|string $apps =null app-names
|
||||||
*/
|
*/
|
||||||
function __construct($allow,$account=null,$apps=null)
|
function __construct($allow,$account=null,$apps=null, $other=array())
|
||||||
{
|
{
|
||||||
if (!is_array($allow))
|
if (!is_array($allow))
|
||||||
{
|
{
|
||||||
@ -37,7 +37,7 @@ class admin_cmd_account_app extends admin_cmd
|
|||||||
'allow' => $allow,
|
'allow' => $allow,
|
||||||
'account' => $account,
|
'account' => $account,
|
||||||
'apps' => $apps,
|
'apps' => $apps,
|
||||||
);
|
)+(array)$other;
|
||||||
}
|
}
|
||||||
if (isset($allow['apps']) && !is_array($allow['apps']))
|
if (isset($allow['apps']) && !is_array($allow['apps']))
|
||||||
{
|
{
|
||||||
@ -65,7 +65,7 @@ class admin_cmd_account_app extends admin_cmd
|
|||||||
|
|
||||||
$old_rights = (array)$GLOBALS['egw']->acl->get_app_list_for_id('run', Egroupware\Api\Acl::READ, $account_id);
|
$old_rights = (array)$GLOBALS['egw']->acl->get_app_list_for_id('run', Egroupware\Api\Acl::READ, $account_id);
|
||||||
$new_rights = $this->allow ?
|
$new_rights = $this->allow ?
|
||||||
$old_rights + array($apps) :
|
array_merge($old_rights, $apps) :
|
||||||
array_diff($old_rights, $apps);
|
array_diff($old_rights, $apps);
|
||||||
|
|
||||||
$this->set = Array('app' => $new_rights);
|
$this->set = Array('app' => $new_rights);
|
||||||
|
Loading…
Reference in New Issue
Block a user