mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 01:43:47 +01:00
remove add-button in sidebox menu if user has no add rights
This commit is contained in:
parent
a1e8f71b22
commit
d9843f38df
@ -18,6 +18,8 @@ class resources_hooks
|
|||||||
{
|
{
|
||||||
function admin_prefs_sidebox($args)
|
function admin_prefs_sidebox($args)
|
||||||
{
|
{
|
||||||
|
$this->acl =& CreateObject('resources.bo_acl');
|
||||||
|
|
||||||
$appname = 'resources';
|
$appname = 'resources';
|
||||||
$location = is_array($args) ? $args['location'] : $args;
|
$location = is_array($args) ? $args['location'] : $args;
|
||||||
|
|
||||||
@ -30,13 +32,17 @@ class resources_hooks
|
|||||||
'link' => $GLOBALS['egw']->link('/index.php',array('menuaction' => 'resources.ui_resources.index' )),
|
'link' => $GLOBALS['egw']->link('/index.php',array('menuaction' => 'resources.ui_resources.index' )),
|
||||||
// 'icon' =>
|
// 'icon' =>
|
||||||
);
|
);
|
||||||
$file[] = array(
|
|
||||||
|
if($this->acl->get_cats(EGW_ACL_ADD))
|
||||||
|
{
|
||||||
|
$file[] = array(
|
||||||
'text' => '<a class="textSidebox" href="'.$GLOBALS['egw']->link('/index.php',array('menuaction' => 'resources.ui_resources.edit')).
|
'text' => '<a class="textSidebox" href="'.$GLOBALS['egw']->link('/index.php',array('menuaction' => 'resources.ui_resources.edit')).
|
||||||
'" onclick="window.open(this.href,\'_blank\',\'dependent=yes,width=800,height=600,scrollbars=yes,status=yes\');
|
'" onclick="window.open(this.href,\'_blank\',\'dependent=yes,width=800,height=600,scrollbars=yes,status=yes\');
|
||||||
return false;">'.lang('add resource').'</a>',
|
return false;">'.lang('add resource').'</a>',
|
||||||
'no_lang' => true,
|
'no_lang' => true,
|
||||||
'link' => false
|
'link' => false
|
||||||
);
|
);
|
||||||
|
}
|
||||||
// $file[] = array(
|
// $file[] = array(
|
||||||
// 'text' => lang('planer'),
|
// 'text' => lang('planer'),
|
||||||
// 'no_lang' => true,
|
// 'no_lang' => true,
|
||||||
|
Loading…
Reference in New Issue
Block a user