fedms_federation¶
The structural backbone of FedMS. Owns the three group types, their fields, the federation hooks, the group-relationship status field, and the declarative roles/permissions configuration.
GitLab¶
What it ships¶
Group types¶
Three group bundles, defined as group.type.* config entities:
| Bundle | Purpose |
|---|---|
org |
Top-level organization unit. |
event |
Sub-group of an org. |
session |
Sub-group of an event. |
All three are subgroup-aware via subgroup:subgroup.
Group fields¶
A rich set of fields per bundle. See Concepts → Organizations, Events, Sessions.
Notable fields:
field_gitlab_id(org) — federation anchor.field_sync(event, session) — federation sync marker.field_flag_start_processed,field_flag_end_processed(event, session) — lifecycle flags consumed bytask_apiECA model.field_date(event, session) — smart-date window.
Group relationship types¶
The full matrix of relationship types — org-group_media-*,
event-group_media-*, session-group_media-*, org-group_node-*,
event-group_node-*, session-group_node-*, org-subgroup-event,
event-subgroup-session, and the three *-group_membership types.
Views¶
Federation-level views that drive the dashboards and the cron-based lifecycle processing:
views.view.orgsviews.view.organizationsviews.view.upcoming_eventsviews.view.upcoming_events_globallyviews.view.event_sessionsviews.view.group_membersviews.view.group_membershipsviews.view.group_mediaviews.view.group_usersviews.view.groups_unprocessed— used by cron to walk unprocessed lifecycle events.views.view.content
Pathauto patterns¶
pathauto.pattern.group_orgspathauto.pattern.group_eventspathauto.pattern.group_sessions
Roles and permissions¶
The declarative permission map at
config/roles_permissions.yml.
See Group roles.
Hooks (src/Hook/EntityHooks.php)¶
The federation module exposes its hooks through a single class using
the Drupal 11 #[Hook] attribute style:
entityQueryGroupRelationshipAlter¶
Reserved for status-aware filtering of group_relationship queries. Currently a no-op while the design is being finalized.
entityBaseFieldInfo¶
Adds a status boolean base field to group_relationship. This is
the soft-delete switch — when set to FALSE, the relationship is
"removed" but the record is preserved.
ginContentFormRoutes¶
Registers the group add/edit forms with the Gin theme so they get the Gin admin layout:
entity.group.add_formentity.group.edit_formentity.group_relationship.create_formentity.group_relationship.edit_form
queryEntityReferenceAlter ⭐¶
The federation's most important hook. Alters entity-reference
queries when the reference target is user and we're rendering on
a group page. Two behaviors:
- Exclude existing members. Users already members of the current group are removed from the picker — so you can't "add" someone twice.
- Restrict sessions to parent-event members. If the group is a session, only users who are members of the parent event are offered. This is the load-bearing access constraint for sessions. Do not bypass.
The hook reads the current request's referer to discover the
group context, validates the URL, and applies the SQL condition
directly to the query.
groupRelationshipInsert (after subgroup)¶
Re-runs pathauto's alias creation after the subgroup module
finishes its own insert handling, so the resulting alias reflects
the freshly-installed subgroup hierarchy.
Module dependencies¶
1 2 3 4 5 6 7 8 9 10 11 | |
When to change this module¶
- Adding a field to
org,event, orsessiongroup. - Changing the membership-restriction policy on sessions.
- Adding a new view that lists groups / memberships globally.
- Adjusting the role-to-permission map (in
config/roles_permissions.yml). - Implementing federation transport (when the work lands).
When not to change this module¶
- Changing
fedms_event/fedms_sessioncontent fields — those belong tofedms_content. - Changing task behavior — that belongs to
fedms_taskorfedms_eca. - Adding tenant-specific content or types.
Next steps¶
fedms_content— the editorial entities.- Entities — the cross-module data model.
- Federation concept — the federation model.