Gestalte den Mitgliederbereich nach Brand-UI-Kit 14 neu
Eine Navigation (Meine Bibliothek, Programme, Meine Lizenzen, Konto-Menü) mit der freigegebenen Wortmarke, Startseite ohne erfundene Inhalte, Bibliothek mit Inhaltsart-Filter und einer Karte je Medienidentität („Verwendet in“), Programm-/Moduldetail, Film und Material im Zusammenhang mit Begleitmaterial und Weg zurück, Lizenzübersicht mit Detailseite je Berechtigung. Alle Größen aus der Größenskala (ADR-44, neues Token --card-min). Tests bewusst angepasst: Der Film spielt auf der Kontextseite statt eingebettet im Programm, Download-Links tragen ein Symbol, der Platzhalter ist ein dekoratives Element, die Wortmarke ist das freigegebene Logo. Die Vorschau der Bibliothekskarte in der Verwaltung nutzt dieselbe Komponente. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9f070fbab2
commit
2e6260acca
41 files changed
+3742
-1093
No files matched your search
+326
-45
@@ -9,6 +9,7 @@
|
||||
use App\Domain\Catalog\CompositionVersion;
|
||||
use App\Domain\Catalog\ContentElement;
|
||||
use App\Domain\Catalog\ContentElementVersion;
|
||||
use App\Domain\Catalog\EditorialProfileReader;
|
||||
use App\Domain\Catalog\ReleaseStatus;
|
||||
use App\Domain\Catalog\StructureNode;
|
||||
use App\Domain\Entitlement\DecideAccess;
|
||||
@@ -18,24 +19,48 @@
|
||||
use App\Domain\Media\ThumbnailRef;
|
||||
use App\Filament\Support\EditorialCatalog;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Liest die Mitgliederbibliothek aus den vorhandenen Fachobjekten (Kompositionen, Medien, Artikelstände, Berechtigungen).
|
||||
* Sie hält keine eigenen Daten. Jede Zugriffsfrage entscheidet DecideAccess; die Oberfläche zeigt nur das Ergebnis.
|
||||
*
|
||||
* Einmalaufbau: Der Strukturbaum einer Komposition wird je Anfrage nur einmal gebaut und für Verfügbarkeit,
|
||||
* Zählungen und die programmübergreifende Medienliste gemeinsam genutzt.
|
||||
*/
|
||||
class LibraryCatalog
|
||||
{
|
||||
/** @var array<string, list<array<string, mixed>>> */
|
||||
private array $trees = [];
|
||||
|
||||
/** @var array<string, array{title: string, summary: ?string, description: ?string}> */
|
||||
private array $texts = [];
|
||||
|
||||
/** @var array<int, ?ContentElement> */
|
||||
private array $elements = [];
|
||||
|
||||
public function __construct(
|
||||
private readonly CompositionDisplayRelease $display,
|
||||
private readonly CompositionStructureReader $structure,
|
||||
private readonly DecideAccess $access,
|
||||
private readonly EditorialProfileReader $profiles,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Programme, Module und einzelne Medien (Filme und Materialien) der Berechtigungen des Kontos.
|
||||
*
|
||||
* Einzelne Medien erscheinen genau einmal je stabiler Medienidentität (Inhaltselement), gleich in wie vielen Programmen
|
||||
* oder Modulen sie vorkommen. „used_in“ nennt diese Verwendungen. Innerhalb eines Programms bleibt jede Einbindung an
|
||||
* ihrer Stelle erhalten (program()). Gleiche Titel verschiedener Elemente bleiben getrennt.
|
||||
*
|
||||
* @return array{programs: list<array<string, mixed>>, modules: list<array<string, mixed>>, materials: list<array<string, mixed>>}
|
||||
*/
|
||||
public function index(User $user): array
|
||||
{
|
||||
$programs = [];
|
||||
$modules = [];
|
||||
$materials = [];
|
||||
$media = [];
|
||||
|
||||
foreach ($this->grants($user) as $grant) {
|
||||
$article = $grant->article;
|
||||
@@ -44,124 +69,360 @@ public function index(User $user): array
|
||||
$version = $release?->rootCompositionVersion;
|
||||
|
||||
if ($composition !== null && $version !== null && $this->display->isReleased($version)) {
|
||||
$shown = $this->display->highestReleasedVersion($composition);
|
||||
$nodes = $shown === null ? [] : $this->tree($user, $shown, false, $composition->id);
|
||||
$picture = app(EditorialCatalog::class)->visiblePicture($composition, $version);
|
||||
$text = $this->text($composition);
|
||||
$card = [
|
||||
'type' => $composition->editorialContentKind?->slug === 'modul' ? 'modul' : 'programm',
|
||||
'composition' => $composition,
|
||||
'subject' => $composition,
|
||||
'version' => $version,
|
||||
'title' => filled($composition->display_title) ? $composition->display_title : $composition->designation,
|
||||
'summary' => $composition->summary,
|
||||
'title' => $text['title'],
|
||||
'summary' => $text['summary'],
|
||||
'kind' => $composition->editorialContentKind?->label
|
||||
?? ($composition->kind?->label()),
|
||||
'coverage' => $this->coverageLabel($user, $composition),
|
||||
'coverage' => $this->coverage($nodes),
|
||||
'module_count' => $this->countCompositions($nodes),
|
||||
'duration_minutes' => $shown?->duration_minutes,
|
||||
'image' => $picture['alt'] ?? null,
|
||||
'image_url' => $picture === null ? null : route('member.thumbnail', [
|
||||
'kind' => $picture['kind'],
|
||||
'subject' => $picture['subject'],
|
||||
]),
|
||||
'url' => route('member.program', $composition),
|
||||
];
|
||||
$shelf = $composition->editorialContentKind?->slug === 'modul' ? 'modules' : 'programs';
|
||||
if ($shelf === 'modules') {
|
||||
|
||||
if ($card['type'] === 'modul') {
|
||||
$modules[$composition->id] = $card;
|
||||
} else {
|
||||
$programs[$composition->id] = $card;
|
||||
}
|
||||
|
||||
$this->collect($media, $nodes, [['title' => $text['title'], 'url' => $card['url'], 'id' => $composition->id]], $composition);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
$element = $release?->rootElementVersion?->element;
|
||||
$elementId = $element?->id;
|
||||
$key = $composition !== null
|
||||
? 'komposition-'.$composition->id
|
||||
: ($elementId !== null ? 'element-'.$elementId : 'artikel-'.$article->id);
|
||||
: ($element?->id !== null ? 'element-'.$element->id : 'artikel-'.$article->id);
|
||||
$subject = $element ?? $composition ?? $article;
|
||||
$text = $element !== null ? $this->text($element) : null;
|
||||
$imageUrl = $element === null ? null : ThumbnailRef::url('member.thumbnail', 'element', $element->id, $element->thumbnail_path);
|
||||
$materials[$key] = [
|
||||
'article' => $article,
|
||||
'title' => app(CourseOutline::class)->title($article),
|
||||
'summary' => $element?->summary ?? $composition?->summary,
|
||||
'kind' => app(CourseOutline::class)->kindLabel($article),
|
||||
'coverage' => 'nutzbar',
|
||||
'image' => $imageUrl === null ? null : ($element->thumbnail_alt ?: $element->working_title),
|
||||
'image_url' => $imageUrl,
|
||||
$media[$key] = ($media[$key] ?? []) + [
|
||||
'used_in' => [],
|
||||
'versions' => [],
|
||||
'context' => null,
|
||||
];
|
||||
$media[$key] = [
|
||||
...$media[$key],
|
||||
'key' => $key,
|
||||
'type' => $element?->output_class === 'film' ? 'film' : 'material',
|
||||
'article' => $article,
|
||||
'subject' => $subject,
|
||||
'title' => $text['title'] ?? app(CourseOutline::class)->title($article),
|
||||
'summary' => $text['summary'] ?? $element?->summary ?? $composition?->summary,
|
||||
'kind' => app(CourseOutline::class)->kindLabel($article) ?? ($element === null ? null : $this->outputLabel($element->output_class)),
|
||||
'coverage' => 'nutzbar',
|
||||
'image' => $imageUrl === null ? null : ($element->thumbnail_alt ?: ($text['title'] ?? $element->working_title)),
|
||||
'image_url' => $imageUrl,
|
||||
'url' => route('member.article', $article),
|
||||
];
|
||||
}
|
||||
|
||||
foreach ($media as $key => $item) {
|
||||
if (! isset($item['url'])) {
|
||||
$media[$key]['url'] = route('member.content', [
|
||||
'composition' => $item['context']['composition']->id,
|
||||
'version' => $item['context']['version_id'],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
'programs' => array_values($programs),
|
||||
'modules' => array_values($modules),
|
||||
'materials' => array_values($materials),
|
||||
'materials' => array_values($media),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array{composition: Composition, title: string, kind: ?string, nodes: list<array<string, mixed>>}
|
||||
* Programm- oder Moduldetail: gesamte Struktur mit allen Einbindungen an ihrer Stelle.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function program(User $user, Composition $composition): array
|
||||
{
|
||||
$version = $this->display->highestReleasedVersion($composition);
|
||||
abort_if($version === null, 404);
|
||||
|
||||
$nodes = array_map(
|
||||
fn (StructureNode $node): array => $this->present($user, $node),
|
||||
$this->structure->tree($version),
|
||||
);
|
||||
$nodes = $this->tree($user, $version, true, $composition->id);
|
||||
$leaves = $this->leaves($nodes);
|
||||
$open = count(array_filter($leaves, fn (array $leaf): bool => $leaf['view_url'] !== null));
|
||||
$text = $this->text($composition);
|
||||
|
||||
return [
|
||||
'composition' => $composition,
|
||||
'picture' => app(EditorialCatalog::class)->visiblePicture($composition, $version),
|
||||
'title' => filled($composition->display_title) ? $composition->display_title : $composition->designation,
|
||||
'summary' => $composition->summary,
|
||||
'title' => $text['title'],
|
||||
'summary' => $text['summary'],
|
||||
'description' => $text['description'],
|
||||
'kind' => $composition->editorialContentKind?->label
|
||||
?? ($composition->kind?->label()),
|
||||
'is_module' => $composition->editorialContentKind?->slug === 'modul',
|
||||
'learning_goal' => $version->learning_goal,
|
||||
'duration_minutes' => $version->duration_minutes,
|
||||
'material_note' => $version->material_note,
|
||||
'coverage' => $leaves === [] ? 'nicht enthalten' : ($open === count($leaves) ? 'nutzbar' : ($open === 0 ? 'nicht enthalten' : 'teilweise')),
|
||||
'coverage' => $this->coverage($nodes),
|
||||
'module_count' => $this->countCompositions($nodes),
|
||||
'film_count' => count(array_filter($leaves, fn (array $leaf): bool => $leaf['output_class'] === 'film')),
|
||||
'material_count' => count(array_filter($leaves, fn (array $leaf): bool => $leaf['element_id'] !== null && $leaf['output_class'] !== 'film')),
|
||||
'open_count' => count(array_filter($leaves, fn (array $leaf): bool => $leaf['view_url'] !== null)),
|
||||
'leaf_count' => count($leaves),
|
||||
'nodes' => $nodes,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Eine Filmstelle oder ein Material im Zusammenhang seines Programms oder Moduls.
|
||||
* Gesucht wird die Einbindung in der angezeigten Fassung; was dort nicht steht, gibt es hier nicht.
|
||||
*
|
||||
* @return array<string, mixed>|null
|
||||
*/
|
||||
public function content(User $user, Composition $composition, int $elementVersionId): ?array
|
||||
{
|
||||
$version = $this->display->highestReleasedVersion($composition);
|
||||
|
||||
if ($version === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$nodes = $this->tree($user, $version, true, $composition->id);
|
||||
$found = $this->locate($nodes, $elementVersionId, []);
|
||||
|
||||
if ($found === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$node = $found['node'];
|
||||
$element = $node['element_id'] === null ? null : $this->element($node['element_id']);
|
||||
$text = $element === null ? ['title' => $node['title'], 'summary' => null, 'description' => null] : $this->text($element);
|
||||
$rootText = $this->text($composition);
|
||||
$trail = [['label' => $rootText['title'], 'url' => route('member.program', $composition)]];
|
||||
|
||||
foreach ($found['parents'] as $parent) {
|
||||
if ($parent['program_url'] !== null && $parent['composition_id'] !== $composition->id) {
|
||||
$trail[] = ['label' => $parent['title'], 'url' => $parent['program_url']];
|
||||
}
|
||||
}
|
||||
|
||||
$companions = array_values(array_filter(
|
||||
$found['siblings'],
|
||||
fn (array $sibling): bool => $sibling['children'] === []
|
||||
&& $sibling['element_id'] !== null
|
||||
&& $sibling['version_id'] !== $elementVersionId,
|
||||
));
|
||||
|
||||
return [
|
||||
'composition' => $composition,
|
||||
'program_title' => $rootText['title'],
|
||||
'node' => $node,
|
||||
'element' => $element,
|
||||
'title' => $text['title'],
|
||||
'summary' => $text['summary'],
|
||||
'description' => $text['description'],
|
||||
'trail' => $trail,
|
||||
'back' => $trail[array_key_last($trail)],
|
||||
'companions' => $companions,
|
||||
'allowed' => $node['view_url'] !== null,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Anzeigetitel und -texte für die Mitgliederbibliothek: Abweichung für „Mitgliederbibliothek“, sonst die zentrale Angabe,
|
||||
* zuletzt die interne Bezeichnung. Nichts wird kopiert oder ergänzt.
|
||||
*
|
||||
* @return array{title: string, summary: ?string, description: ?string}
|
||||
*/
|
||||
public function text(Model $subject): array
|
||||
{
|
||||
$key = $subject->getMorphClass().':'.$subject->getKey();
|
||||
|
||||
if (isset($this->texts[$key])) {
|
||||
return $this->texts[$key];
|
||||
}
|
||||
|
||||
$profile = $this->profiles->read($subject, 'bibliothek');
|
||||
|
||||
return $this->texts[$key] = [
|
||||
'title' => $profile->value('display_title') ?? $profile->workingTitle ?? '',
|
||||
'summary' => $profile->value('summary') ?? $profile->value('teaser'),
|
||||
'description' => $profile->value('description'),
|
||||
];
|
||||
}
|
||||
|
||||
public function outputLabel(?string $outputClass): ?string
|
||||
{
|
||||
return match ($outputClass) {
|
||||
'film' => 'Film',
|
||||
'audio' => 'Hörstück',
|
||||
'document', 'pdf' => 'Dokument',
|
||||
'text' => 'Text',
|
||||
'bild' => 'Bild',
|
||||
null => null,
|
||||
default => $outputClass,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list<array<string, mixed>> $nodes
|
||||
* @param list<array{title: string, url: string, id: int}> $contexts
|
||||
* @param array<string, array<string, mixed>> $media
|
||||
*/
|
||||
private function collect(array &$media, array $nodes, array $contexts, Composition $root): void
|
||||
{
|
||||
foreach ($nodes as $node) {
|
||||
if ($node['children'] !== []) {
|
||||
$nested = $contexts;
|
||||
|
||||
if ($node['composition_id'] !== null && $node['program_url'] !== null && $node['composition_id'] !== $root->id) {
|
||||
$nested[] = ['title' => $node['title'], 'url' => $node['program_url'], 'id' => $node['composition_id']];
|
||||
}
|
||||
|
||||
$this->collect($media, $node['children'], $nested, $root);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($node['element_id'] === null || $node['view_url'] === null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$key = 'element-'.$node['element_id'];
|
||||
$element = $this->element($node['element_id']);
|
||||
$text = $element === null ? ['title' => $node['title'], 'summary' => null] : $this->text($element);
|
||||
$item = $media[$key] ?? [
|
||||
'key' => $key,
|
||||
'type' => $node['output_class'] === 'film' ? 'film' : 'material',
|
||||
'article' => null,
|
||||
'subject' => $element,
|
||||
'title' => $text['title'],
|
||||
'summary' => $text['summary'],
|
||||
'kind' => $node['kind'] ?? $this->outputLabel($node['output_class']),
|
||||
'coverage' => 'nutzbar',
|
||||
'image' => $node['poster_url'] === null ? null : ($element?->thumbnail_alt ?: $text['title']),
|
||||
'image_url' => $node['poster_url'],
|
||||
'used_in' => [],
|
||||
'versions' => [],
|
||||
'context' => null,
|
||||
];
|
||||
|
||||
foreach ($contexts as $context) {
|
||||
$item['used_in'][$context['id']] = ['title' => $context['title'], 'url' => $context['url']];
|
||||
}
|
||||
|
||||
$item['versions'][$node['version_id']] = true;
|
||||
$item['context'] ??= ['composition' => $root, 'version_id' => $node['version_id']];
|
||||
$media[$key] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list<array<string, mixed>>
|
||||
*/
|
||||
private function tree(User $user, CompositionVersion $version, bool $full, int $rootId): array
|
||||
{
|
||||
$key = $version->id.':'.($full ? 'voll' : 'kurz').':'.$rootId;
|
||||
|
||||
return $this->trees[$key] ??= array_map(
|
||||
fn (StructureNode $node): array => $this->present($user, $node, $full, $rootId),
|
||||
$this->structure->tree($version),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
private function present(User $user, StructureNode $node): array
|
||||
private function present(User $user, StructureNode $node, bool $full, int $rootId): array
|
||||
{
|
||||
$view = null;
|
||||
$download = null;
|
||||
|
||||
$playback = 'file';
|
||||
|
||||
$poster = null;
|
||||
$element = $node->contentElementId === null ? null : $this->element($node->contentElementId);
|
||||
|
||||
if ($node->contentElementVersionId !== null) {
|
||||
$view = $this->open($user, $node->contentElementVersionId, $this->viewAction($node->outputClass));
|
||||
$download = $this->open($user, $node->contentElementVersionId, 'laden');
|
||||
$playback = app(FilmPlayback::class)->mode($node->contentElementVersionId);
|
||||
if ($view !== null && $node->contentElementId !== null) {
|
||||
$path = ContentElement::query()->whereKey($node->contentElementId)->value('thumbnail_path');
|
||||
$poster = ThumbnailRef::url('member.thumbnail', 'element', $node->contentElementId, $path);
|
||||
|
||||
if ($full) {
|
||||
$download = $this->open($user, $node->contentElementVersionId, 'laden');
|
||||
$playback = app(FilmPlayback::class)->mode($node->contentElementVersionId);
|
||||
}
|
||||
|
||||
if ($view !== null && $element !== null) {
|
||||
$poster = ThumbnailRef::url('member.thumbnail', 'element', $element->id, $element->thumbnail_path);
|
||||
}
|
||||
}
|
||||
|
||||
$title = $node->title;
|
||||
|
||||
if ($element !== null) {
|
||||
$title = $this->text($element)['title'] ?: $title;
|
||||
} elseif ($node->compositionId !== null) {
|
||||
$nested = Composition::query()->find($node->compositionId);
|
||||
$title = $nested === null ? $title : ($this->text($nested)['title'] ?: $title);
|
||||
}
|
||||
|
||||
return [
|
||||
'role' => $node->role,
|
||||
'title' => $node->title,
|
||||
'kind' => $node->editorialKindLabel ?? $node->technicalKindLabel,
|
||||
'title' => $title,
|
||||
'summary' => $element === null ? null : $this->text($element)['summary'],
|
||||
'kind' => $node->editorialKindLabel ?? $this->outputLabel($node->technicalKindLabel) ?? $node->technicalKindLabel,
|
||||
'output_class' => $node->outputClass,
|
||||
'playback' => $playback,
|
||||
'view_url' => $view,
|
||||
'poster_url' => $poster,
|
||||
'download_url' => $download,
|
||||
'program_url' => $this->programUrl($node),
|
||||
'composition_id' => $node->compositionId,
|
||||
'element_id' => $node->contentElementId,
|
||||
'version_id' => $node->contentElementVersionId,
|
||||
'content_url' => $node->contentElementVersionId === null ? null : route('member.content', [
|
||||
'composition' => $rootId,
|
||||
'version' => $node->contentElementVersionId,
|
||||
]),
|
||||
'children' => array_map(
|
||||
fn (StructureNode $child): array => $this->present($user, $child),
|
||||
fn (StructureNode $child): array => $this->present($user, $child, $full, $rootId),
|
||||
$node->children,
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list<array<string, mixed>> $nodes
|
||||
* @param list<array<string, mixed>> $parents
|
||||
* @return array{node: array<string, mixed>, parents: list<array<string, mixed>>, siblings: list<array<string, mixed>>}|null
|
||||
*/
|
||||
private function locate(array $nodes, int $versionId, array $parents): ?array
|
||||
{
|
||||
foreach ($nodes as $node) {
|
||||
if ($node['version_id'] === $versionId) {
|
||||
return ['node' => $node, 'parents' => $parents, 'siblings' => $nodes];
|
||||
}
|
||||
|
||||
if ($node['children'] !== []) {
|
||||
$found = $this->locate($node['children'], $versionId, [...$parents, $node]);
|
||||
|
||||
if ($found !== null) {
|
||||
return $found;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list<array<string, mixed>> $nodes
|
||||
* @return list<array<string, mixed>>
|
||||
@@ -183,18 +444,29 @@ private function leaves(array $nodes): array
|
||||
return $leaves;
|
||||
}
|
||||
|
||||
private function coverageLabel(User $user, Composition $composition): string
|
||||
/**
|
||||
* @param list<array<string, mixed>> $nodes
|
||||
*/
|
||||
private function countCompositions(array $nodes): int
|
||||
{
|
||||
$version = $this->display->highestReleasedVersion($composition);
|
||||
$count = 0;
|
||||
|
||||
if ($version === null) {
|
||||
return 'nicht enthalten';
|
||||
foreach ($nodes as $node) {
|
||||
if ($node['composition_id'] !== null) {
|
||||
$count++;
|
||||
}
|
||||
|
||||
$count += $this->countCompositions($node['children']);
|
||||
}
|
||||
|
||||
$nodes = array_map(
|
||||
fn (StructureNode $node): array => $this->present($user, $node),
|
||||
$this->structure->tree($version),
|
||||
);
|
||||
return $count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list<array<string, mixed>> $nodes
|
||||
*/
|
||||
private function coverage(array $nodes): string
|
||||
{
|
||||
$leaves = $this->leaves($nodes);
|
||||
$open = count(array_filter($leaves, fn (array $leaf): bool => $leaf['view_url'] !== null));
|
||||
|
||||
@@ -205,6 +477,15 @@ private function coverageLabel(User $user, Composition $composition): string
|
||||
return $open === count($leaves) ? 'nutzbar' : 'teilweise';
|
||||
}
|
||||
|
||||
private function element(int $id): ?ContentElement
|
||||
{
|
||||
if (! array_key_exists($id, $this->elements)) {
|
||||
$this->elements[$id] = ContentElement::query()->find($id);
|
||||
}
|
||||
|
||||
return $this->elements[$id];
|
||||
}
|
||||
|
||||
private function programUrl(StructureNode $node): ?string
|
||||
{
|
||||
if ($node->compositionId === null || $node->compositionVersionId === null) {
|
||||
|
||||
Reference in new issue
Block a user