Browse Source

Add rights to see tab (hrm->employee->read)

aspangaro 9 years ago
parent
commit
6598ac6745
1 changed files with 1 additions and 1 deletions
  1. 1 1
      htdocs/core/lib/usergroups.lib.php

+ 1 - 1
htdocs/core/lib/usergroups.lib.php

@@ -94,7 +94,7 @@ function user_prepare_head($object)
     // $this->tabs = array('entity:-tabname);   												to remove a tab
     complete_head_from_modules($conf,$langs,$object,$head,$h,'user');
 
-	if (! empty($conf->hrm->enabled))
+	if (! empty($conf->hrm->enabled) && $user->rights->hrm->employee->read)
     {
 		// Bank
     	$head[$h][0] = DOL_URL_ROOT.'/user/bank.php?id='.$object->id;