Merge pull request #7942 from delcroip/fixDeleteSalaries
fix: unable to remove salaries, plus correct default rights management
This commit is contained in:
commit
d3150ede42
@ -242,9 +242,9 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu
|
||||
{
|
||||
foreach($feature2 as $subfeature)
|
||||
{
|
||||
if (empty($user->rights->$feature->$subfeature->creer)
|
||||
&& empty($user->rights->$feature->$subfeature->write)
|
||||
&& empty($user->rights->$feature->$subfeature->create)) { $createok=0; $nbko++; }
|
||||
if (empty($user->rights->$feature->$subfeature->creer)
|
||||
&& empty($user->rights->$feature->$subfeature->write)
|
||||
&& empty($user->rights->$feature->$subfeature->create)) { $createok=0; $nbko++; }
|
||||
else { $createok=1; break; } // Break to bypass second test if the first is ok
|
||||
}
|
||||
}
|
||||
@ -306,6 +306,9 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu
|
||||
else if ($feature == 'ftp')
|
||||
{
|
||||
if (! $user->rights->ftp->write) $deleteok=0;
|
||||
}else if ($feature == 'salaries')
|
||||
{
|
||||
if (! $user->rights->salaries->delete) $deleteok=0;
|
||||
}
|
||||
else if (! empty($feature2)) // This should be used for future changes
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user