Skip to content

Commit 0205fe9

Browse files
authored
Fix create check
1 parent 4c509b4 commit 0205fe9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Policies/LaravelGovernorPolicy.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,12 @@ public function before($user)
2020
return $user->isSuperAdmin ? true : null;
2121
}
2222

23-
public function create(Model $user, Model $model) : bool
23+
public function create(Model $user) : bool
2424
{
2525
return $this->validatePermissions(
2626
$user,
2727
'create',
28-
$this->entity,
29-
$model->governor_created_by
28+
$this->entity
3029
);
3130
}
3231

@@ -70,7 +69,7 @@ public function remove(Model $user, Model $model) : bool
7069
);
7170
}
7271

73-
protected function validatePermissions($user, $action, $entity, $entityCreatorId) : bool
72+
protected function validatePermissions($user, $action, $entity, $entityCreatorId = null) : bool
7473
{
7574
$user->load('roles');
7675

0 commit comments

Comments
 (0)