Interface IGlobalRoleIdentityService
The IGlobalRoleIdentityService interface
Namespace: ImageVault.Common.Services
Assembly: ImageVault.Common.dll
Syntax
public interface IGlobalRoleIdentityService : IService
Methods
Find(GlobalRoleIdentityQuery)
Finds one or more Identities objects based on the supplied query
Declaration
IList<GlobalRoleIdentity> Find(GlobalRoleIdentityQuery query)
Parameters
Type | Name | Description |
---|---|---|
GlobalRoleIdentityQuery | query | The GlobalRoleIdentityQuery describing what data to find |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<GlobalRoleIdentity> |
GetRolesForCurrentUser()
Gets all global roles for the current user as a bit coded value. Use bitwise and to check if the user has a role. if (GetRolesForCurrentUser() & GlobalRoles.Administrator) { ... }
Declaration
GlobalRoles GetRolesForCurrentUser()
Returns
Type | Description |
---|---|
GlobalRoles | The GlobalRoles containing all roles that the current user belongs to |
IsUserInRole(GlobalRoles)
Checks if the user matches the supplied role(s). If multiple roles are supplied, every role must be assigned to the current user
Declaration
bool IsUserInRole(GlobalRoles roles)
Parameters
Type | Name | Description |
---|---|---|
GlobalRoles | roles | The GlobalRoles the user must be member of |
Returns
Type | Description |
---|---|
System.Boolean | True if user in is role, otherwise false. |
Store(GlobalRoleIdentity)
Stores the supplied identity object to the database
Declaration
GlobalRoleIdentity Store(GlobalRoleIdentity identity)
Parameters
Type | Name | Description |
---|---|---|
GlobalRoleIdentity | identity | The GlobalRoleIdentity to store |
Returns
Type | Description |
---|---|
GlobalRoleIdentity |
Remarks
This will only store the Roles property of the identity. All other properties are read only