feat: companies CRUD with person dialog integration and navigation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,16 @@ final class CompanyPolicy
|
||||
|| $organisation->users()->where('user_id', $user->id)->exists();
|
||||
}
|
||||
|
||||
public function view(User $user, Company $company, Organisation $organisation): bool
|
||||
{
|
||||
if ($company->organisation_id !== $organisation->id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $user->hasRole('super_admin')
|
||||
|| $organisation->users()->where('user_id', $user->id)->exists();
|
||||
}
|
||||
|
||||
public function create(User $user, Organisation $organisation): bool
|
||||
{
|
||||
return $this->canManageOrganisation($user, $organisation);
|
||||
|
||||
Reference in New Issue
Block a user