Multi-user OSINT investigation tool with owner-controlled per-user and per-group access grants. Includes Sherlock, theHarvester, crt.sh, WHOIS, and ip-api.com collectors wired through a pluggable Runner/queue pipeline, investigation search, and printable/CSV/JSON reporting. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
43 lines
798 B
PHP
43 lines
798 B
PHP
<?php
|
|
|
|
namespace App\Policies;
|
|
|
|
use App\Models\Group;
|
|
use App\Models\User;
|
|
|
|
class GroupPolicy
|
|
{
|
|
public function viewAny(User $user): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function view(User $user, Group $group): bool
|
|
{
|
|
return $group->isAccessibleBy($user);
|
|
}
|
|
|
|
public function create(User $user): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function update(User $user, Group $group): bool
|
|
{
|
|
return $group->owner_id === $user->id;
|
|
}
|
|
|
|
public function delete(User $user, Group $group): bool
|
|
{
|
|
return $group->owner_id === $user->id;
|
|
}
|
|
|
|
/**
|
|
* Only the owner can add/remove members.
|
|
*/
|
|
public function manageMembers(User $user, Group $group): bool
|
|
{
|
|
return $group->owner_id === $user->id;
|
|
}
|
|
}
|