Skip to content

Commit

Permalink
pass test by fix the implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexzPurewoko committed Dec 15, 2023
1 parent b3f2410 commit d548cf1
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function removeAbility(string $action, string $resource, string $scope, m
return;
}

$this->storage->onDeleteSpecificRule($existingRule->getRuleId());
$this->storage->onDeleteSpecificRule($this->currentUserId, $existingRule->getRuleId());
$this->refresh();
}

Expand All @@ -117,11 +117,12 @@ public function removeAbilities(array $rules): void

$existingRule = $this->getChecker()->getRuleOf($rule);
if ($existingRule !== null) {
$this->storage->onDeleteSpecificRule($existingRule->getRuleId());
$this->storage->onDeleteSpecificRule($existingRule->getRuleId(), $this->currentUserId);
}
}

$this->refresh();
// var_dump($this->storage->onGetRulesByUserId($this->currentUserId));
}

/**
Expand Down Expand Up @@ -150,7 +151,7 @@ public function update(Rule|string $old, Rule|string $new): void
return;
}

$this->storage->onUpdateRule($existingRule->getRuleId(), "$new");
$this->storage->onUpdateRule($existingRule->getRuleId(), $this->currentUserId, "$new");
$this->refresh();
}

Expand Down

0 comments on commit d548cf1

Please sign in to comment.