Files
cedry2k1992andClaude Sonnet 5 873699e23e Initial commit: Laravel OSINT platform
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>
2026-07-20 10:22:05 +03:00

118 lines
7.1 KiB
PHP

<x-app-layout>
<x-slot name="header">
<div>
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
{{ __('Manage Access') }} &mdash; {{ $investigation->name }}
</h2>
<a href="{{ route('investigations.show', $investigation) }}" class="text-sm text-indigo-600 dark:text-indigo-400 hover:underline">
{{ __('Back to investigation') }}
</a>
</div>
</x-slot>
<div class="py-12">
<div class="max-w-2xl mx-auto sm:px-6 lg:px-8 space-y-6">
@if ($errors->any())
<div class="bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200 text-sm rounded-md p-4">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<div class="bg-white dark:bg-gray-800 shadow-sm sm:rounded-lg p-6">
<h3 class="font-semibold text-gray-800 dark:text-gray-200 mb-4">{{ __('Users') }}</h3>
<ul class="divide-y divide-gray-200 dark:divide-gray-700">
<li class="py-2 flex justify-between items-center">
<span>{{ $investigation->owner->name }} <span class="text-xs text-gray-500 dark:text-gray-400">({{ $investigation->owner->email }})</span></span>
<span class="text-xs uppercase tracking-wide text-gray-500 dark:text-gray-400">{{ __('owner') }}</span>
</li>
@forelse ($investigation->users as $user)
<li class="py-2 flex justify-between items-center">
<span>{{ $user->name }} <span class="text-xs text-gray-500 dark:text-gray-400">({{ $user->email }})</span></span>
<div class="flex items-center gap-3">
<span class="text-xs uppercase tracking-wide text-gray-500 dark:text-gray-400">{{ $user->pivot->role }}</span>
<form method="POST" action="{{ route('investigations.access.users.destroy', [$investigation, $user]) }}">
@csrf
@method('DELETE')
<button type="submit" class="text-xs text-red-600 dark:text-red-400 hover:underline">{{ __('Revoke') }}</button>
</form>
</div>
</li>
@empty
@endforelse
</ul>
<form method="POST" action="{{ route('investigations.access.users.store', $investigation) }}" class="mt-6 pt-6 border-t border-gray-200 dark:border-gray-700 flex items-end gap-3">
@csrf
<div class="flex-1">
<x-input-label for="email" :value="__('User email')" />
<x-text-input id="email" name="email" type="email" class="mt-1 block w-full" required />
</div>
<div>
<x-input-label for="role" :value="__('Role')" />
<select id="role" name="role" class="mt-1 text-sm border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 rounded-md">
<option value="viewer">{{ __('viewer') }}</option>
<option value="editor">{{ __('editor') }}</option>
</select>
</div>
<x-primary-button type="submit">{{ __('Grant') }}</x-primary-button>
</form>
</div>
<div class="bg-white dark:bg-gray-800 shadow-sm sm:rounded-lg p-6">
<h3 class="font-semibold text-gray-800 dark:text-gray-200 mb-4">{{ __('Groups') }}</h3>
<ul class="divide-y divide-gray-200 dark:divide-gray-700">
@forelse ($investigation->groups as $group)
<li class="py-2 flex justify-between items-center">
<a href="{{ route('groups.show', $group) }}" class="hover:underline">{{ $group->name }}</a>
<div class="flex items-center gap-3">
<span class="text-xs uppercase tracking-wide text-gray-500 dark:text-gray-400">{{ $group->pivot->role }}</span>
<form method="POST" action="{{ route('investigations.access.groups.destroy', [$investigation, $group]) }}">
@csrf
@method('DELETE')
<button type="submit" class="text-xs text-red-600 dark:text-red-400 hover:underline">{{ __('Revoke') }}</button>
</form>
</div>
</li>
@empty
<li class="py-2 text-sm text-gray-500 dark:text-gray-400">{{ __('No groups granted access yet.') }}</li>
@endforelse
</ul>
@if ($availableGroups->isNotEmpty())
<form method="POST" action="{{ route('investigations.access.groups.store', $investigation) }}" class="mt-6 pt-6 border-t border-gray-200 dark:border-gray-700 flex items-end gap-3">
@csrf
<div class="flex-1">
<x-input-label for="group_id" :value="__('Group')" />
<select id="group_id" name="group_id" class="mt-1 block w-full text-sm border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 rounded-md">
@foreach ($availableGroups as $group)
<option value="{{ $group->id }}">{{ $group->name }}</option>
@endforeach
</select>
</div>
<div>
<x-input-label for="group_role" :value="__('Role')" />
<select id="group_role" name="role" class="mt-1 text-sm border-gray-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 rounded-md">
<option value="viewer">{{ __('viewer') }}</option>
<option value="editor">{{ __('editor') }}</option>
</select>
</div>
<x-primary-button type="submit">{{ __('Grant') }}</x-primary-button>
</form>
@else
<p class="mt-6 pt-6 border-t border-gray-200 dark:border-gray-700 text-sm text-gray-500 dark:text-gray-400">
{{ __("You don't own or belong to any other groups to grant access to.") }}
<a href="{{ route('groups.create') }}" class="text-indigo-600 dark:text-indigo-400 hover:underline">{{ __('Create one') }}</a>.
</p>
@endif
</div>
</div>
</div>
</x-app-layout>