Verified Commit ffe6536f authored by Arnaud Pauget's avatar Arnaud Pauget
Browse files

WIP : disable checkRight if communication rule allows it

parent cccb4c9e
......@@ -563,7 +563,7 @@ trait archiveAccessTrait
} else {
$archive = $archiveId;
}
if ($checkAccess) {
$this->checkRights($archive);
}
......@@ -999,10 +999,10 @@ trait archiveAccessTrait
* @throws
* @return boolean THe result of the operation
*/
public function checkRights($archive)
public function checkRights($archive, $CommunicationRequest = false)
{
$currentUserService = \laabs::getToken("ORGANIZATION");
$currentDate = \laabs::newDate();
// $currentDate = \laabs::newDate();
if (!$currentUserService) {
return false;
......@@ -1031,10 +1031,11 @@ trait archiveAccessTrait
}
// COMMUNICATION ACCESS
if (!is_null($archive->accessRuleComDate)
&& ($archive->accessRuleComDate <= $currentDate)) {
return true;
}
// if (!is_null($archive->accessRuleComDate)
// && $CommunicationRequest
// && ($archive->accessRuleComDate <= $currentDate)) {
// return true;
// }
// USER ACCESS
if (!empty($archive->userOrgRegNumbers)) {
......
......@@ -263,7 +263,7 @@
if (!parameters == -1) {
return;
}
parameters.archiveIds = $("#save").data('archiveids');
if(!parameters.archiveIds) {
......@@ -275,7 +275,7 @@
} else {
type = 'PUT';
}
console.log(this.actionsList[this.modalType])
$.ajax({
url : this.actionsList[this.modalType],
type : type,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment