Exemplo n.º 1
0
 /**
  * Can the user delete a repeat group
  *
  * @since   3.0.1
  *
  * @return  bool
  */
 public function canDeleteRepeat()
 {
     $ok = false;
     if ($this->canRepeat()) {
         $params = $this->getParams();
         $row = $this->getFormModel()->getData();
         $ok = FabrikWorker::canUserDo($params, $row, 'repeat_delete_access_user');
         if ($ok === -1) {
             $groups = $this->user->getAuthorisedViewLevels();
             $ok = in_array($params->get('repeat_delete_access', 1), $groups);
         }
     }
     return $ok;
 }
Exemplo n.º 2
0
 /**
  * Access control function for determining if the user can perform
  * a designated function on a specific row
  *
  * @param   object  $row  data
  * @param   string  $col  access control setting to compare against
  *
  * @return  mixed	- if ACL setting defined here return bool, otherwise return -1 to contiune with default acl setting
  */
 protected function canUserDo($row, $col)
 {
     $params = $this->getParams();
     return FabrikWorker::canUserDo($params, $row, $col);
 }