CanEditActivity

Function: canEditActivity()

[object Object]

Defined in: app/routes/activity/activity.handlers.tsx:63

Determines if the current user has permission to edit a specific activity.

Logic:

  • Board Members: Always allowed to edit.
  • Organizers: Allowed only if the activity hasn't been finalized for external systems (Website/Koala) and the event hasn't started yet.

Parameters

activity

ActivityResponseDto

The activity data to check against.

tokenParsed

[object Object]

The parsed Keycloak JWT containing user roles and ID.

Returns

boolean | 0 | null | undefined

True if the user is authorized to edit.

On this page