Do not show actions which user has no run permission

This commit is contained in:
Hadi Nategh 2017-04-21 16:21:49 +02:00
parent ba7f8f2d80
commit 490a8f6ff4
2 changed files with 11 additions and 0 deletions

View File

@ -264,6 +264,12 @@ class mail_compose
} }
unset($actions['pgp']); unset($actions['pgp']);
} }
// remove vfs actions if the user has no run access to filemanager
if (!$GLOBALS['egw_info']['user']['apps']['filemanager'])
{
unset($actions['save2vfs']);
unset($actions['selectFromVFSForCompose']);
}
return $actions; return $actions;
} }

View File

@ -1300,6 +1300,11 @@ class mail_ui
{ {
unset($actions['calendar']); unset($actions['calendar']);
} }
// remove vfs actions if the user has no run access to filemanager
if (!$GLOBALS['egw_info']['user']['apps']['filemanager'])
{
unset($actions['save']['children']['save2filemanager']);
}
return $actions; return $actions;
} }