mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-08 04:11:59 +01:00
Data officer should see emails marked for deletion only
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
fe59b0519c
commit
fea81910f4
@ -683,6 +683,13 @@ class ModelSearchSearch extends Model {
|
|||||||
|
|
||||||
if($id == '') { return 0; }
|
if($id == '') { return 0; }
|
||||||
|
|
||||||
|
if(Registry::get('data_officer') == 1) {
|
||||||
|
$query = $this->db->query("SELECT id FROM " . TABLE_DELETED . " WHERE deleted=-1 AND id=?", array($id));
|
||||||
|
if(!isset($query->row['id'])) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if((Registry::get('auditor_user') == 1 || Registry::get('data_officer') == 1) && RESTRICTED_AUDITOR == 0) { return 1; }
|
if((Registry::get('auditor_user') == 1 || Registry::get('data_officer') == 1) && RESTRICTED_AUDITOR == 0) { return 1; }
|
||||||
|
|
||||||
$session = Registry::get('session');
|
$session = Registry::get('session');
|
||||||
|
Loading…
Reference in New Issue
Block a user