Code cleanup and better auth check

This commit is contained in:
James Cole
2020-07-12 17:31:11 +02:00
parent e24c2491a6
commit 0c9a25a073
2 changed files with 1 additions and 3 deletions

View File

@@ -36,7 +36,7 @@ class DataDestroyRequest extends Request
public function authorize(): bool
{
// Only allow authenticated users
return auth()->check();
return auth()->check() && !auth()->user()->hasRole('demo');
}
/**