mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 16:02:15 +00:00
DB_Model->_isEntitled: now if the user is not entitled to perform an
operation the query is reset
This commit is contained in:
@@ -651,9 +651,13 @@ class DB_Model extends FHC_Model
|
||||
substr(get_called_class(), -6) == DB_Model::MODEL_POSTFIX) ||
|
||||
$permission != PermissionLib::SELECT_RIGHT)
|
||||
{
|
||||
// If true is not returned, then an error has occurred
|
||||
if (($isEntitled = $this->isEntitled($this->dbTable, $permission, FHC_NORIGHT, FHC_MODEL_ERROR)) !== true)
|
||||
{
|
||||
// TODO: resetQuery
|
||||
// Before returning the object containing the error, reset the build query
|
||||
// This is for preventing that other parts of the query will be built before of the next execution
|
||||
$this->resetQuery();
|
||||
|
||||
return $isEntitled;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user