permissions created

This commit is contained in:
Benjamin Takats
2022-12-15 14:27:06 +01:00
parent 5d6de66e3d
commit f217c4a04d
21 changed files with 154 additions and 66 deletions

View File

@@ -55,7 +55,7 @@ class CourseEventPolicy extends BasePolicy
*/
public function update(User $user, CourseEvent $courseEvent)
{
return $user->belongsToTeam($courseEvent->course->lecturer->team);
return $user->belongsToTeam($courseEvent->course->lecturer->team) || $user->can((new \ReflectionClass($this))->getShortName().'.'.__FUNCTION__);
}
/**