Check permissions

This commit is contained in:
paolo
2016-04-22 16:31:46 +02:00
parent f6f533a23b
commit 18df562208
9 changed files with 27 additions and 18 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ class Nation_model extends DB_Model
// Checks if the operation is permitted by the API caller
// All the code should be put inside this if statement
if($this->_checkPermissions())
if(isAllowed($this->_addonID, 'person'))
{
$result = $this->db->query($this->_getNationQuery($notLocked, $orderEnglish));
}
@@ -61,7 +61,7 @@ class Nation_model extends DB_Model
// Checks if the operation is permitted by the API caller
// All the code should be put inside this if statement
if($this->_checkPermissions())
if(isAllowed($this->_addonID, 'person'))
{
$result = $this->db->query($this->_federalStateQuery);
}
+3 -3
View File
@@ -54,7 +54,7 @@ class Person_model extends DB_Model
// Checks if the operation is permitted by the API caller
// All the code should be put inside this if statement
if($this->_checkPermissions())
if(isAllowed($this->_addonID, 'person'))
{
if((isset($code)) && (isset($email)))
{
@@ -135,7 +135,7 @@ class Person_model extends DB_Model
// Checks if the operation is permitted by the API caller
// All the code should be put inside this if statement
if($this->_checkPermissions())
if(isAllowed($this->_addonID, 'person'))
{
if($this->_validate($person))
{
@@ -331,7 +331,7 @@ class Person_model extends DB_Model
{
// Checks if the operation is permitted by the API caller
// All the code should be put inside this if statement
if($this->_checkPermissions())
if(isAllowed($this->_addonID, 'person'))
{
return $this->_saveInterestedStudent($interestedStudent);
}
+1 -1
View File
@@ -33,7 +33,7 @@ class Course_model extends DB_Model
// Checks if the operation is permitted by the API caller
// All the code should be put inside this if statement
if($this->_checkPermissions())
if(isAllowed($this->_addonID, 'person'))
{
$result = $this->db->query($this->_enabledCoursesQuery);
}
+1 -1
View File
@@ -24,7 +24,7 @@ class Plan_model extends DB_Model
// Checks if the operation is permitted by the API caller
// All the code should be put inside this if statement
if($this->_checkPermissions())
if(isAllowed($this->_addonID, 'person'))
{
$result = $this->db->query($this->_planQuery, array($courseOfStudiesID));
}