* Timesheet - Admin only status also blocks editing & deleting for non-admins

This commit is contained in:
nathangray 2018-07-30 13:36:43 -06:00
parent 17ba77d369
commit e5c13a0df6

View File

@ -416,9 +416,10 @@ class timesheet_ui extends timesheet_bo
// or the preserved project-blur comming from the current selected project
$content['ts_title_blur'] = $preserv['ts_title_blur'] ? $preserv['ts_title_blur'] : $content['ts_project_blur'];
$readonlys = array(
'button[delete]' => !$this->data['ts_id'] || !$this->check_acl(Acl::DELETE) || $this->data['ts_status'] == self::DELETED_STATUS,
'button[delete]' => !$this->data['ts_id'] || !$this->check_acl(Acl::DELETE) ||
$this->data['ts_status'] == self::DELETED_STATUS ||$only_admin_edit ,
'button[undelete]' => $this->data['ts_status'] != self::DELETED_STATUS,
'button[edit]' => !$view || !$this->check_acl(Acl::EDIT),
'button[edit]' => !$view || !$this->check_acl(Acl::EDIT) || $only_admin_edit,
'button[save]' => $view,
'button[save_new]' => $view,
'button[apply]' => $view,