Team Access
The Team Access module restricts users with limited SportsPress roles to only see and edit content belonging to their assigned team or teams. Without this module, a Team Manager, Event Manager, Staff member, or Player can see all records of each post type in their admin list screens. With Team Access enabled and a team assigned to the user, those list screens are filtered so only relevant records appear.
This feature is part of SportsPress Pro.
Which roles are affected
Team Access applies to four roles:
Team Manager (
sp_team_manager)Event Manager (
sp_event_manager)Staff (
sp_staff)Player (
sp_player)
The League Manager and Administrator roles are not subject to team filtering.
Which post types are filtered
When Team Access is active and a user has one or more teams assigned, the following post type list screens are filtered in the WordPress admin:
sp_event — Events
sp_calendar — Calendars
sp_team — Teams
sp_table — League Tables
sp_player — Players
sp_list — Player Lists
sp_staff — Staff
Records without a team assignment are always visible to limited-role users regardless of their team setting. This prevents records from disappearing simply because they have not yet been assigned to a team.
How filtering works by post type
For the sp_team post type, the query is restricted to post__in — only the team IDs directly assigned to the user are shown.
For all other filtered post types, the query checks the record's team metadata:
spplayer and spstaff records: filtered by the
sp_current_teammeta fieldAll other post types (events, calendars, tables, player lists): filtered by the
sp_teammeta field
A record is visible if its team meta field contains at least one of the user's assigned teams, or if the team meta field is not set at all.
Assigning teams to a user
In the WordPress admin, go to Users > All Users.
Click the username of the user you want to configure.
Scroll down to the Team Access section.
In the Team field, select one or more teams from the dropdown. The field uses a searchable multi-select (Chosen.js). Leave it empty to allow access to all records (no filter applied).
Click Update User.
The Team Access section is only shown on the profile edit screen when the user holds one of the four affected roles. It does not appear for Administrators or League Managers.
Assigning a user to multiple teams
The Team field accepts multiple selections. Select each team the user should have access to. The filter uses an OR condition — a record is shown if it matches any of the user's assigned teams.
Preventing unauthorised saves
In addition to filtering list screens, the module prevents a limited-role user from saving a post that does not belong to their assigned team. If a user somehow attempts to update a record outside their team access, WordPress terminates the request with an error.
Enabling or disabling the module
Team Access is controlled by the option sportspress_load_team_access_module. It defaults to yes. To disable the module, go to SportsPress > Settings > Modules and turn off Team Access.
