re #108 use app main logger + multiple fixes

This commit is contained in:
Antonio Ramirez
2017-11-12 21:58:48 +01:00
parent 77430fbb74
commit 190fafa5f1
30 changed files with 100 additions and 63 deletions

View File

@ -31,14 +31,14 @@ class AuthRuleEditionService implements ServiceInterface
public function run()
{
if (!$this->model->validate() || (!in_array($this->model->scenario, ['create', 'update']))) {
if (!$this->model->validate() || (!in_array($this->model->scenario, ['create', 'update'], false))) {
return false;
}
$rule = $this->make($this->model->className, [], ['name' => $this->model->name]);
try {
if ($this->model->scenario == 'create') {
if ($this->model->scenario === 'create') {
$this->getAuthManager()->add($rule);
} else {
$this->getAuthManager()->update($this->model->previousName, $rule);