C# Класс UCDArch.Web.Providers.CatbertRoleProvider

CAESDORoleProvider inherits from the generic RoleProvider provided by ASP.NET that is part of their provider model (which includes Membership, Role and Profile Providers)
Could also inherit from the SqlRoleProvider -- maybe worth looking at
Наследование: System.Web.Security.RoleProvider
Показать файл Открыть проект

Private Properties

Свойство Тип Описание

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

Метод Описание
AddUsersToRoles ( string usernames, string roleNames ) : void
CreateRole ( string roleName ) : void
DeleteRole ( string roleName, bool throwOnPopulatedRole ) : bool
FindUsersInRole ( string roleName, string usernameToMatch ) : string[]
GetAllRoles ( ) : string[]

Gets all roles in the application context

GetRolesForUser ( string username ) : string[]

Gets all roles for the user in the context of this application

GetUsersInRole ( string roleName ) : string[]

Gets all users that are in the current role in the application context

InitWithoutConfig ( string appName, string connectionString ) : void

Just set the appname and connection string

Initialize ( string name, NameValueCollection config ) : void

Initialized from the web.config file when the application loads for the first time.

IsUserInRole ( string username, string roleName ) : bool

Determine if a user is in the supplied role in this application.

RemoveUsersFromRoles ( string usernames, string roleNames ) : void
RoleExists ( string roleName ) : bool

Find out if a role exists within an application context

A return of false doesn't mean that the role doesn't exist in the db, just that it doesn't exists withing the context of this application

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

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

public AddUsersToRoles ( string usernames, string roleNames ) : void
usernames string
roleNames string
Результат void

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

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

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

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

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

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

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

Gets all roles in the application context
public GetAllRoles ( ) : string[]
Результат string[]

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

Gets all roles for the user in the context of this application
public GetRolesForUser ( string username ) : string[]
username string LoginID to get the roles for
Результат string[]

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

Gets all users that are in the current role in the application context
public GetUsersInRole ( string roleName ) : string[]
roleName string
Результат string[]

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

Just set the appname and connection string
public InitWithoutConfig ( string appName, string connectionString ) : void
appName string
connectionString string
Результат void

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

Initialized from the web.config file when the application loads for the first time.
public Initialize ( string name, NameValueCollection config ) : void
name string The name of the role provider
config System.Collections.Specialized.NameValueCollection Collection of keys. They need to include ApplicationName, ConnectionString. /// Description is optional
Результат void

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

Determine if a user is in the supplied role in this application.
public IsUserInRole ( string username, string roleName ) : bool
username string LoginID
roleName string RoleName
Результат bool

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

public RemoveUsersFromRoles ( string usernames, string roleNames ) : void
usernames string
roleNames string
Результат void

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

Find out if a role exists within an application context
A return of false doesn't mean that the role doesn't exist in the db, just that it doesn't exists withing the context of this application
public RoleExists ( string roleName ) : bool
roleName string RoleName
Результат bool