Interface ITitleAccessDal
Administrative data functionality for managing title access.
Namespace: CrashCABN.DataAccess
Assembly: CrashCABN.DataAccess.SQL.Abstractions.dll
Syntax
public interface ITitleAccessDal
Methods
View SourceDeleteAccessAsync(string, string)
Deletes a request for access to a title.
Declaration
Task DeleteAccessAsync(string title, string user)
Parameters
Type | Name | Description |
---|---|---|
string | title | The title name. |
string | user | The user name. |
Returns
Type | Description |
---|---|
Task | A task representing the work to delete the request. |
GetAllAccessRequestsAsync(string?)
Gets all title access requests, optionally for a specific title.
Declaration
IAsyncEnumerable<TitleAccessRequest> GetAllAccessRequestsAsync(string? title)
Parameters
Type | Name | Description |
---|---|---|
string | title | The title name, or null indicates all titles. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<TitleAccessRequest> | An async enumeration of access requests. |
GetAllTitlesAsync()
Gets an enumeration of all titles.
Declaration
IAsyncEnumerable<Title> GetAllTitlesAsync()
Returns
Type | Description |
---|---|
IAsyncEnumerable<Title> | An async enumeration of all titles. |
GetRecentAccessRequestsAsync()
Gets all recent title access requests.
Declaration
IAsyncEnumerable<TitleAccessRequest> GetRecentAccessRequestsAsync()
Returns
Type | Description |
---|---|
IAsyncEnumerable<TitleAccessRequest> | An async enumeration of access requests. |
GetTitlesForWhichUserIsApprovedAsync(string, bool)
Gets a list of titles for which the user is approved to download crashes.
Declaration
IAsyncEnumerable<string> GetTitlesForWhichUserIsApprovedAsync(string user, bool retail)
Parameters
Type | Name | Description |
---|---|---|
string | user | The user to get titles for. |
bool | retail | Whether or not the user needs retail approval. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<string> | An async enumeration of title names. |
GetUserAccessRequestsAsync(string)
Gets the user's title access requests.
Declaration
IAsyncEnumerable<TitleAccessRequest> GetUserAccessRequestsAsync(string user)
Parameters
Type | Name | Description |
---|---|---|
string | user | The user to get requests for. |
Returns
Type | Description |
---|---|
IAsyncEnumerable<TitleAccessRequest> | An async enumeration of access requests. |
IsApprovedForTitleAsync(string, string, bool)
Determines if a user is approved to download crashes for a specified title.
Declaration
Task<bool> IsApprovedForTitleAsync(string user, string title, bool retail)
Parameters
Type | Name | Description |
---|---|---|
string | user | The user to check for title access. |
string | title | A registered title. |
bool | retail | Whether or not the user needs retail approval. |
Returns
Type | Description |
---|---|
Task<bool> | True if approved. Otherwise, false. |
RedirectAccessAsync(string, int)
Redirects a request for access to a title.
Declaration
Task RedirectAccessAsync(string title, int id)
Parameters
Type | Name | Description |
---|---|---|
string | title | The title name. |
int | id | The request ID. |
Returns
Type | Description |
---|---|
Task | A task representing the work to redirect the request. |
RenewAccessAsync(string, string)
Renews access to a title.
Declaration
Task RenewAccessAsync(string title, string user)
Parameters
Type | Name | Description |
---|---|---|
string | title | The title name. |
string | user | The user name. |
Returns
Type | Description |
---|---|
Task | A task representing the work to renew access. |
RequestAccessAsync(string, string, bool)
Requests access to a title.
Declaration
Task RequestAccessAsync(string title, string user, bool autoApprove = false)
Parameters
Type | Name | Description |
---|---|---|
string | title | The title name. |
string | user | The user name. |
bool | autoApprove | Whether or not the request should be auto-approved. |
Returns
Type | Description |
---|---|
Task | A task representing the work to request access. |
UpdateAccessAsync(string, string, bool, string?)
Approves or denies access to a title.
Declaration
Task UpdateAccessAsync(string title, string user, bool approved, string? byTitleAdmin = null)
Parameters
Type | Name | Description |
---|---|---|
string | title | The title name. |
string | user | The user name. |
bool | approved | Whether or not the request is approved. |
string | byTitleAdmin | The title admin alias who made the change, if any. |
Returns
Type | Description |
---|---|
Task | A task representing the work to update access. |