Commit bd160264 authored by ZeMKI's avatar ZeMKI

Update InterviewPolicy.php

parent e500d06a
......@@ -50,7 +50,7 @@ class InterviewPolicy
*/
public function create(User $user, $study)
{
if (! $user->can('create-interviews', Study::where('id', '=', $study)->first()->name)) {
if (! $user->can('create-interviews', Study::where('id', '=', $study)->first()->id)) {
abort(403, 'You are not allowed to create interviews for this study');
}
......
Markdown is supported
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