mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 16:33:17 +01:00
not show apps and context-menu entries for apps not available to user, hooks->single() did not check apps for new method-hooks
This commit is contained in:
parent
82d40e52c0
commit
d0a6e91984
@ -73,10 +73,10 @@ class admin_passwordreset
|
||||
if ($content['download_csv'] && $content['changed'])
|
||||
{
|
||||
html::content_header('changed.csv','text/csv');
|
||||
//echo "account_lid;account_password;account_email;account_firstname;account_lastname\n";
|
||||
//echo "account_lid;account_passwd;account_email;account_firstname;account_lastname\n";
|
||||
foreach($content['changed'] as $account)
|
||||
{
|
||||
echo "$account[account_lid];$account[account_password];$account[account_email];$account[account_firstname];$account[account_lastname]\n";
|
||||
echo "$account[account_lid];$account[account_passwd];$account[account_email];$account[account_firstname];$account[account_lastname]\n";
|
||||
}
|
||||
common::egw_exit();
|
||||
}
|
||||
@ -149,7 +149,7 @@ class admin_passwordreset
|
||||
$GLOBALS['egw']->acl->delete_repository('preferences','nopasswordchange',$account_id);
|
||||
}
|
||||
}
|
||||
$account['account_password'] = $password;
|
||||
$account['account_passwd'] = $password;
|
||||
|
||||
if ((string)$content['mail']['activate'] !== '' || (string)$content['mail']['quota'] !== '' ||
|
||||
strpos($content['mail']['domain'], '.') !== false)
|
||||
|
@ -145,7 +145,7 @@ class admin_ui
|
||||
foreach($apps as $app)
|
||||
{
|
||||
$GLOBALS['menuData'] = $data = array();
|
||||
$data = $GLOBALS['egw']->hooks->single('edit_group', $app, true);
|
||||
$data = $GLOBALS['egw']->hooks->single('edit_group', $app);
|
||||
if (!is_array($data)) $data = $GLOBALS['menuData'];
|
||||
//error_log(__METHOD__."() app $app returned ".array2string($data));
|
||||
foreach($data as $item)
|
||||
@ -226,7 +226,7 @@ class admin_ui
|
||||
foreach($apps as $app)
|
||||
{
|
||||
$GLOBALS['menuData'] = $data = array();
|
||||
$data = $GLOBALS['egw']->hooks->single('edit_user', $app, true);
|
||||
$data = $GLOBALS['egw']->hooks->single('edit_user', $app);
|
||||
if (!is_array($data)) $data = $GLOBALS['menuData'];
|
||||
foreach($data as $item)
|
||||
{
|
||||
|
@ -138,6 +138,11 @@ class hooks
|
||||
{
|
||||
$appname = is_array($args) && isset($args['appname']) ? $args['appname'] : $GLOBALS['egw_info']['flags']['currentapp'];
|
||||
}
|
||||
// excute hook only if $no_permission_check or user has run-rights for app
|
||||
if (!($no_permission_check || isset($GLOBALS['egw_info']['user']['apps'][$appname])))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$SEP = filesystem_separator();
|
||||
|
||||
/* First include the ordered apps hook file */
|
||||
|
Loading…
Reference in New Issue
Block a user