mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-29 19:33:54 +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,6 +32,9 @@ 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' =>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if($this->acl->get_cats(EGW_ACL_ADD))
|
||||||
|
{
|
||||||
$file[] = array(
|
$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\');
|
||||||
@ -37,6 +42,7 @@ class resources_hooks
|
|||||||
'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