Interface ITeamAccessRequestService
- Namespace
- Tharga.Team
- Assembly
- Tharga.Team.dll
Requesting access to teams, and seeing requests across teams — the interface a component, controller or MCP provider should inject for them. Filtered rather than scope-gated.
public interface ITeamAccessRequestService
Remarks
Separate from ITeamManagementService, which is gated and wholly team-bound, for two reasons. Requesting
is authorized by holding a consent role rather than a scope — the requester holds nothing on the team yet — and the
two cross-team reads name no team, so they cannot be gated by the team a call names. Each read recomputes what the
caller may see per team instead: their own requests, or requests on teams where their membership grants
team:manage.
Approving and denying are on ITeamManagementService, gated on team:manage.
Methods
CancelTeamAccessRequestAsync(string, string)
Withdraws the caller's own pending request.
Task CancelTeamAccessRequestAsync(string teamKey, string requestId)
Parameters
Returns
GetAccessRequestsAwaitingMeAsync()
Pending requests the caller can decide: on teams where their membership grants team:manage, excluding
their own. Newest first.
Task<IReadOnlyList<TeamAccessRequestItem>> GetAccessRequestsAwaitingMeAsync()
Returns
GetMyAccessRequestsAsync()
The caller's own requests across the teams they can see, newest first.
Task<IReadOnlyList<TeamAccessRequestItem>> GetMyAccessRequestsAsync()
Returns
Remarks
Read from every team when the caller holds teams:read — which a requester needs anyway, to find a team they
are not in — and from no team otherwise. Only requests the caller made are returned.
RequestTeamAccessAsync(string, AccessLevel, TimeSpan?, string)
Asks for access to a team the caller is not a member of. Requires one of the configured consent roles. Replaces the caller's pending request on that team, if any.
Task<TeamAccessRequest> RequestTeamAccessAsync(string teamKey, AccessLevel accessLevel, TimeSpan? duration, string message)
Parameters
teamKeystringaccessLevelAccessLeveldurationTimeSpan?messagestring