Adding the permissions addNewObjectPermissions method

This commit is contained in:
Gustavo Adolfo Cruz Laura
2016-03-28 17:26:29 -04:00
parent 9f922f680f
commit ea9ed0b448
2 changed files with 20 additions and 1 deletions

View File

@@ -2833,6 +2833,25 @@ class Processes
}
/**
* @param $aPermission
* @throws Exception
*/
public function addNewObjectPermissionRows($aPermission)
{
try {
$oPermission = new ObjectPermission();
foreach ($aPermission as $key => $row) {
if (!$oPermission->Exists($row['OP_UID'])) {
$oPermission->create($row);
}
}
} catch (Exception $e) {
throw $e;
}
}
/**
* Get Object Permission Rows from a Process
*