Assign the existing site to one landlord so stommer.info can run tenancy.
Seebad 0.3 stays in this release. With a single landlord every host still reaches the default website. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
d9e52c4789
commit
8ebc1a3878
93 files changed
+2506
-112
No files matched your search
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use App\Models\Tenant;
|
||||
use App\Models\User;
|
||||
|
||||
/**
|
||||
* Landlords are created and suspended by the operator. Deleting one is a later, separate step.
|
||||
*/
|
||||
class TenantPolicy
|
||||
{
|
||||
public function viewAny(User $user): bool
|
||||
{
|
||||
return $user->is_operator;
|
||||
}
|
||||
|
||||
public function view(User $user, Tenant $tenant): bool
|
||||
{
|
||||
return $user->is_operator;
|
||||
}
|
||||
|
||||
public function create(User $user): bool
|
||||
{
|
||||
return $user->is_operator;
|
||||
}
|
||||
|
||||
public function update(User $user, Tenant $tenant): bool
|
||||
{
|
||||
return $user->is_operator;
|
||||
}
|
||||
|
||||
public function delete(User $user, Tenant $tenant): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function deleteAny(User $user): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user