chore: auto-commit perubahan selesai
This commit is contained in:
@@ -29,24 +29,12 @@ class ActivityPolicy
|
||||
|
||||
public function update(AuthUser $authUser, Activity $activity): bool
|
||||
{
|
||||
if ($authUser->can('Update:Activity')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return $authUser->hasRole('koordinator')
|
||||
&& $activity->created_by === $authUser->id
|
||||
&& is_null($activity->approved_at);
|
||||
return $authUser->can('Update:Activity');
|
||||
}
|
||||
|
||||
public function delete(AuthUser $authUser, Activity $activity): bool
|
||||
{
|
||||
if ($authUser->can('Delete:Activity')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return $authUser->hasRole('koordinator')
|
||||
&& $activity->created_by === $authUser->id
|
||||
&& is_null($activity->approved_at);
|
||||
return $authUser->can('Delete:Activity');
|
||||
}
|
||||
|
||||
public function deleteAny(AuthUser $authUser): bool
|
||||
|
||||
Reference in New Issue
Block a user