mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-18 03:48:55 +01:00
allow to document group deletion
This commit is contained in:
parent
08b9138ae6
commit
c93719bc02
@ -253,14 +253,14 @@ class admin_account
|
|||||||
}
|
}
|
||||||
//error_log(__METHOD__."() \$_GET[account_id]=$_GET[account_id], \$_GET[contact_id]=$_GET[contact_id] content=".array2string($content));
|
//error_log(__METHOD__."() \$_GET[account_id]=$_GET[account_id], \$_GET[contact_id]=$_GET[contact_id] content=".array2string($content));
|
||||||
}
|
}
|
||||||
if ($GLOBALS['egw']->acl->check('account_access',32,'admin') || !($content['account_id'] > 0) ||
|
if ($GLOBALS['egw']->acl->check('account_access',32,'admin') ||
|
||||||
$GLOBALS['egw_info']['user']['account_id'] == $content['account_id'])
|
$GLOBALS['egw_info']['user']['account_id'] == $content['account_id'])
|
||||||
{
|
{
|
||||||
Framework::window_close(lang('Permission denied!!!'));
|
Framework::window_close(lang('Permission denied!!!'));
|
||||||
}
|
}
|
||||||
if ($content['delete'])
|
if ($content['delete'])
|
||||||
{
|
{
|
||||||
$cmd = new admin_cmd_delete_account($content['account_id'], $content['new_owner'], true, $content['admin_cmd']);
|
$cmd = new admin_cmd_delete_account($content['account_id'], $content['new_owner'], $content['account_id'] > 0, $content['admin_cmd']);
|
||||||
$msg = $cmd->run();
|
$msg = $cmd->run();
|
||||||
if ($content['contact_id'])
|
if ($content['contact_id'])
|
||||||
{
|
{
|
||||||
|
@ -175,7 +175,7 @@ app.classes.admin = AppJS.extend(
|
|||||||
{
|
{
|
||||||
this.iframe.set_src(_url);
|
this.iframe.set_src(_url);
|
||||||
}
|
}
|
||||||
var m = _url.match(/menuaction=([^&]+)(?:.*appname=(\w+))?/)
|
var m = _url.match(/menuaction=([^&]+)(?:.*appname=(\w+))?/);
|
||||||
if(m.length >= 2)
|
if(m.length >= 2)
|
||||||
{
|
{
|
||||||
var app = m[2] ? m[2] : m[1].split('.')[0];
|
var app = m[2] ? m[2] : m[1].split('.')[0];
|
||||||
@ -416,9 +416,12 @@ app.classes.admin = AppJS.extend(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'delete':
|
case 'delete':
|
||||||
this.egw.json('admin_account::ajax_delete_group', [account_id]).sendRequest();
|
if (!this.egw.app('policy'))
|
||||||
break;
|
{
|
||||||
|
this.egw.json('admin_account::ajax_delete_group', [account_id]).sendRequest();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// fall through to open popup for policy
|
||||||
default:
|
default:
|
||||||
if (!_action.data.url)
|
if (!_action.data.url)
|
||||||
{
|
{
|
||||||
@ -485,8 +488,9 @@ app.classes.admin = AppJS.extend(
|
|||||||
*
|
*
|
||||||
* @param content List of content for the dialog template
|
* @param content List of content for the dialog template
|
||||||
* @param sel_options optional select options
|
* @param sel_options optional select options
|
||||||
* @param {et2_widget} widgetContainer of etemplate that 'owns' the dialog
|
* @param {etemplate2} etemplate of etemplate that 'owns' the dialog
|
||||||
* @param {string} app Name of app
|
* @param {string} app Name of app
|
||||||
|
* @param {function} callback
|
||||||
*/
|
*/
|
||||||
_acl_dialog: function(content, sel_options, etemplate, app, callback)
|
_acl_dialog: function(content, sel_options, etemplate, app, callback)
|
||||||
{
|
{
|
||||||
@ -1303,6 +1307,6 @@ app.classes.admin = AppJS.extend(
|
|||||||
[widget.get_value(), taglist.get_value()],
|
[widget.get_value(), taglist.get_value()],
|
||||||
function(_data){
|
function(_data){
|
||||||
taglist.set_value(_data);
|
taglist.set_value(_data);
|
||||||
}).sendRequest()
|
}).sendRequest();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<overlay>
|
<overlay>
|
||||||
<template id="admin.account.delete" template="" lang="" group="0" version="18.1.001">
|
<template id="admin.account.delete" template="" lang="" group="0" version="18.1.001">
|
||||||
<box class="dialogHeader">
|
<box class="dialogHeader">
|
||||||
<select-account id="account_id" readonly="true" label="Delete account %s"/>
|
<select-account id="account_id" readonly="true" label="Delete"/>
|
||||||
</box>
|
</box>
|
||||||
<tabbox id="tabs" width="99%">
|
<tabbox id="tabs" width="99%">
|
||||||
<tabs>
|
<tabs>
|
||||||
|
Loading…
Reference in New Issue
Block a user