Class OpenBiUsergroupExtensions
Extension methods for usergroups.
Inheritance
Namespace: BiExcellence.OpenBi.Api.Commands.Usergroups
Assembly: BiExcellence.OpenBi.Api.Usergroup.dll
Syntax
public static class OpenBiUsergroupExtensions
Methods
AssignUsergroupToOrganisationAsync(IOpenBiSession, string, string, CancellationToken)
Assigns an usergroup to an organisation.
Declaration
public static Task AssignUsergroupToOrganisationAsync(this IOpenBiSession session, string usergroupId, string organisationId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | usergroupId | The usergroup id. |
string | organisationId | The organisation id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
CreateUsergroupAsync(IOpenBiSession, IUsergroup, CancellationToken)
Creates or updates an usergroup.
Declaration
public static Task CreateUsergroupAsync(this IOpenBiSession session, IUsergroup usergroup, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IUsergroup | usergroup | The usergroup. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
DeleteUsergroupAsync(IOpenBiSession, IUsergroup, CancellationToken)
Deletes an usergorup.
Declaration
public static Task DeleteUsergroupAsync(this IOpenBiSession session, IUsergroup usergroup, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IUsergroup | usergroup | The usergroup. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
DeleteUsergroupAsync(IOpenBiSession, string, CancellationToken)
Deletes an usergroup by id.
Declaration
public static Task DeleteUsergroupAsync(this IOpenBiSession session, string usergroupId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | usergroupId | The usergroup id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
DeleteUsergroupsAsync(IOpenBiSession, IEnumerable<IUsergroup>, CancellationToken)
Deletes usergroups.
Declaration
public static Task DeleteUsergroupsAsync(this IOpenBiSession session, IEnumerable<IUsergroup> usergroups, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IEnumerable<IUsergroup> | usergroups | The usergroup. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
DeleteUsergroupsAsync(IOpenBiSession, IEnumerable<string>, CancellationToken)
Deletes usergroups by id.
Declaration
public static Task DeleteUsergroupsAsync(this IOpenBiSession session, IEnumerable<string> ids, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IEnumerable<string> | ids | The usergroup ids. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
GetUsergroupByIdAsync(IOpenBiSession, string, CancellationToken)
Returns an usergroup by its id.
Declaration
public static Task<IUsergroup?> GetUsergroupByIdAsync(this IOpenBiSession session, string id, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | id | The usergroup id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IUsergroup> | The usergroup or |
GetUsergroups(IOpenBiSession)
Returns usergroups.
Declaration
public static IListRequest<IUsergroup> GetUsergroups(this IOpenBiSession session)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
Returns
Type | Description |
---|---|
IListRequest<IUsergroup> |
GetUsergroupsByObjectIdAsync(IOpenBiSession, string, CancellationToken)
Returns all usergroups for an object (like download).
Declaration
public static Task<IList<IUsergroupAssignment>> GetUsergroupsByObjectIdAsync(this IOpenBiSession session, string objectId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | objectId | The object id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IList<IUsergroupAssignment>> |
GetUsergroupsByOrganisationAsync(IOpenBiSession, string, CancellationToken)
Returns all usergroups for an organisation.
Declaration
public static Task<IList<IUsergroupAssignment>> GetUsergroupsByOrganisationAsync(this IOpenBiSession session, string organisationId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | organisationId | The organisation id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IList<IUsergroupAssignment>> |
GetUsergroupsByUsernameAsync(IOpenBiSession, string, CancellationToken)
Returns all usergroups for an user.
Declaration
public static Task<IList<IUsergroupAssignment>> GetUsergroupsByUsernameAsync(this IOpenBiSession session, string username, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | username | The username. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IList<IUsergroupAssignment>> |
RemoveUsergroupFromOrganisationAsync(IOpenBiSession, string, string, CancellationToken)
Removes an usergroup from an organisation.
Declaration
public static Task RemoveUsergroupFromOrganisationAsync(this IOpenBiSession session, string usergroupId, string organisationId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | usergroupId | The usergroup id. |
string | organisationId | The organisation id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |