Loheide-eu-mitarbeiterplatt.../app/Models/Audience.php
Friederich Loheide 1877a0922f
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 3m45s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 3m39s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 4m25s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 4m21s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 6m49s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 6m59s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 6m21s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 6m30s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m10s
Rollen ausschließen: bei Inhalten (Zielgruppen) und für ganze Module
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-26 19:30:11 +00:00

23 lines
840 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Model;
/**
* Zielgruppen-Regel: Objekt X ist sichtbar für Rolle/Abteilung/Standort Y.
* Objekte ohne Regel sind für alle sichtbar; mehrere Regeln verknüpft ODER.
* „exclude_role“ schließt Personen mit dieser Rolle aus – immer, auch wenn eine
* andere Regel passt.
*/
#[Fillable(['resource_type', 'resource_id', 'rule_type', 'rule_value'])]
class Audience extends Model
{
public const TYPES = ['role' => 'Rolle', 'department' => 'Abteilung', 'location' => 'Standort', 'exclude_role' => 'Ausgeschlossene Rolle'];
/** Regeln, von denen mindestens eine passen muss (die übrigen schließen aus) */
public const INCLUDE_TYPES = ['role', 'department', 'location'];
public $timestamps = false;
}