C# Класс JordanRift.Grassroots.Framework.Services.GrassrootsRoleService

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddUsersToRoles ( string usernames, string roleNames ) : void

Adds the given users to a given role. A user can have only one role so if you call this method with more than one role an exception will be thrown.

CreateRole ( string roleName ) : void
DeleteRole ( string roleName, bool throwOnPopulatedRole ) : bool
FindUsersInRole ( string roleName, string usernameToMatch ) : string[]

Gets an array of user names in a role where the user name contains the specified user name to match.

GetAllRoles ( ) : string[]
GetRolesForUser ( string username ) : string[]
GetUsersInRole ( string roleName ) : string[]
GrassrootsRoleService ( ) : System
IsUserInRole ( string username, string roleName ) : bool
RemoveUsersFromRoles ( string usernames, string roleNames ) : void

Removes the given users from a given role. A user can have only one role so if you call this method with more than one role an exception will be thrown.

RoleExists ( string roleName ) : bool

Описание методов

AddUsersToRoles() публичный Метод

Adds the given users to a given role. A user can have only one role so if you call this method with more than one role an exception will be thrown.
Thrown if you call this method with more than one role.
public AddUsersToRoles ( string usernames, string roleNames ) : void
usernames string an array of userNames
roleNames string an array of roleNames (only 1 role is supported).
Результат void

CreateRole() публичный Метод

public CreateRole ( string roleName ) : void
roleName string
Результат void

DeleteRole() публичный Метод

public DeleteRole ( string roleName, bool throwOnPopulatedRole ) : bool
roleName string
throwOnPopulatedRole bool
Результат bool

FindUsersInRole() публичный Метод

Gets an array of user names in a role where the user name contains the specified user name to match.
public FindUsersInRole ( string roleName, string usernameToMatch ) : string[]
roleName string
usernameToMatch string
Результат string[]

GetAllRoles() публичный Метод

public GetAllRoles ( ) : string[]
Результат string[]

GetRolesForUser() публичный Метод

public GetRolesForUser ( string username ) : string[]
username string
Результат string[]

GetUsersInRole() публичный Метод

public GetUsersInRole ( string roleName ) : string[]
roleName string
Результат string[]

GrassrootsRoleService() публичный Метод

public GrassrootsRoleService ( ) : System
Результат System

IsUserInRole() публичный Метод

public IsUserInRole ( string username, string roleName ) : bool
username string
roleName string
Результат bool

RemoveUsersFromRoles() публичный Метод

Removes the given users from a given role. A user can have only one role so if you call this method with more than one role an exception will be thrown.
Thrown if you call this method with more than one role.
public RemoveUsersFromRoles ( string usernames, string roleNames ) : void
usernames string an array of userNames
roleNames string an array of roleNames (only 1 role is supported).
Результат void

RoleExists() публичный Метод

public RoleExists ( string roleName ) : bool
roleName string
Результат bool