- All permission functionalities now are in the library PermissionLib

- All return messages functions are in the message helper and it is loaded by the core classes
- Added the missing constant FHC_NOPK
- Updated all the interested classes with the new permission method
- Updated all the interested classes with the new return message functions
This commit is contained in:
bison-paolo
2016-10-13 17:53:12 +02:00
parent 40f51d035f
commit 8e0ca12deb
24 changed files with 403 additions and 517 deletions
+4 -4
View File
@@ -15,8 +15,8 @@ class Orgform_model extends DB_Model
public function getOrgformLV()
{
// Checks if the operation is permitted by the API caller
if (! $this->fhc_db_acl->isBerechtigt($this->getBerechtigungKurzbz($this->dbTable), 's'))
return $this->_error(lang('fhc_'.FHC_NORIGHT).' -> '.$this->getBerechtigungKurzbz($this->dbTable), FHC_MODEL_ERROR);
if (($chkRights = $this->isEntitled($this->dbTable, PermissionLib::SELECT_RIGHT, FHC_NORIGHT, FHC_MODEL_ERROR)) !== true)
return $chkRights;
$query = "SELECT *
FROM bis.tbl_orgform
@@ -26,8 +26,8 @@ class Orgform_model extends DB_Model
$result = $this->db->query($query);
if (is_object($result))
return $this->_success($result->result());
return success($result->result());
else
return $this->_error($this->db->error(), FHC_DB_ERROR);
return error($this->db->error(), FHC_DB_ERROR);
}
}