Interface ISecurityApi
Security related APIs.
Namespace: Microsoft.XboxStudios.SQTech.Roster.Client
Assembly: Microsoft.XboxStudios.SQTech.Roster.Client.Common.dll
Syntax
public interface ISecurityApi
Methods
View SourceProjectsWithUserInRole(string, Scope)
Gets the names of projects that have the user as a member of the specified role.
Declaration
IApiRequest<IEnumerable<string>> ProjectsWithUserInRole(string roleName, Scope orgScope)
Parameters
| Type | Name | Description |
|---|---|---|
| string | roleName | The role to check. |
| Scope | orgScope | The scope of the organization to retrieve project names from. |
Returns
| Type | Description |
|---|---|
| IApiRequest<IEnumerable<string>> | The name of projects that have the user as a member of the specified role. |
UserHasContainerPermissions(string, Scope, PermissionFlags)
Checks if the current user has the specified permissions on a container.
Declaration
IApiRequest<bool> UserHasContainerPermissions(string containerName, Scope containerScope, PermissionFlags requiredPermissions)
Parameters
| Type | Name | Description |
|---|---|---|
| string | containerName | |
| Scope | containerScope | The container scope. |
| PermissionFlags | requiredPermissions | The permissions flags to check. |
Returns
| Type | Description |
|---|---|
| IApiRequest<bool> | If the permissions flags specified are assigned to the specified container then true is returned. Otherwise, false. |
UserInRole(string, Scope)
Determines if the current user is in a role.
Declaration
IApiRequest<bool> UserInRole(string roleName, Scope roleScope)
Parameters
| Type | Name | Description |
|---|---|---|
| string | roleName | The role to check. |
| Scope | roleScope | The scope of the role. |
Returns
| Type | Description |
|---|---|
| IApiRequest<bool> |
UserInSecurityGroup(string)
Checks if the current user is in an Active Directory security group.
Declaration
IApiRequest<bool> UserInSecurityGroup(string securityGroupName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | securityGroupName | The Active Directory security group in which to check membership. |
Returns
| Type | Description |
|---|---|
| IApiRequest<bool> | True if the user is a member. Otherwise, false. |