WS-7 Observability — closure #8

Merged
bert.hausmans merged 30 commits from feat/ws-7-observability into main 2026-05-07 22:49:31 +02:00
2 changed files with 7 additions and 9 deletions
Showing only changes of commit 42994522eb - Show all commits

View File

@@ -15,20 +15,19 @@ use Illuminate\Http\Request;
* 1. Portal-token request PORTAL_TOKEN
* 2. Authenticated super_admin SUPER_ADMIN
* 3. Authenticated org_admin ORGANIZER_ADMIN
* 4. Other authenticated user ORG_MEMBER (covers volunteers Crewli has
* no `volunteer` Spatie role today; volunteers join an organisation as
* org_member with org-pivot semantics. Promote to a dedicated case once
* the role model differentiates them at the user level.)
* 4. Other authenticated user ORG_MEMBER
* 5. None of the above UNAUTHENTICATED
*
* The VOLUNTEER case is reserved for that future split.
* Crewli has no dedicated `volunteer` Spatie role today; volunteer-ness is
* behaviour (a user has shift assignments) rather than identity. A
* dedicated VOLUNTEER actor_type case will land alongside that role split
* if/when it is introduced (BACKLOG OBS-1).
*/
enum ActorType: string
{
case ORGANIZER_ADMIN = 'organizer_admin';
case SUPER_ADMIN = 'super_admin';
case PORTAL_TOKEN = 'portal_token';
case VOLUNTEER = 'volunteer';
case ORG_MEMBER = 'org_member';
case UNAUTHENTICATED = 'unauthenticated';

View File

@@ -140,9 +140,8 @@ final class BindSentryContextTest extends TestCase
public function test_org_member_authenticated_user_tags_actor_type_org_member(): void
{
// Crewli has no `volunteer` Spatie role today; volunteers fall into
// org_member. The VOLUNTEER ActorType case is reserved for a future
// split — see ActorType::resolve() docblock.
// Volunteer-ness is behaviour in Crewli (shift assignments), not
// identity — non-admin authenticated users resolve to ORG_MEMBER.
$user = User::factory()->create();
$user->assignRole('org_member');