C# Class MySql.Web.Security.MySQLRoleProvider

Manages storage of role membership information for an ASP.NET application in a MySQL database.
Inheritance: System.Web.Security.RoleProvider
Afficher le fichier Open project: elevate/mysqlconnector-.net Class Usage Examples

Méthodes publiques

Méthode Description
AddUsersToRoles ( string usernames, string rolenames ) : void

Adds the users to roles.

CreateRole ( string rolename ) : void

Creates the role.

DeleteRole ( string rolename, bool throwOnPopulatedRole ) : bool

Deletes the role.

FindUsersInRole ( string rolename, string usernameToMatch ) : string[]

Finds the users in role.

GetAllRoles ( ) : string[]

Gets a list of all the roles for the configured applicationName.

GetRolesForUser ( string username ) : string[]

Gets a list of the roles that a specified user is in for the configured applicationName.

GetUsersInRole ( string rolename ) : string[]

Gets the users in role.

Initialize ( string name, NameValueCollection config ) : void

Initializes the provider.

IsUserInRole ( string username, string rolename ) : bool

Determines whether [is user in role] [the specified username].

RemoveUsersFromRoles ( string usernames, string rolenames ) : void

Removes the users from roles.

RoleExists ( string rolename ) : bool

Roles the exists.

Private Methods

Méthode Description
DeleteUserData ( MySqlConnection connection, int userId ) : void
GetRoleId ( MySqlConnection connection, string rolename ) : int
GetRolesByUserName ( MySqlConnection connection, string username ) : string[]
GetUserId ( MySqlConnection connection, string username ) : int
WriteToEventLog ( Exception e, string action ) : void

Method Details

AddUsersToRoles() public méthode

Adds the users to roles.
public AddUsersToRoles ( string usernames, string rolenames ) : void
usernames string The usernames.
rolenames string The rolenames.
Résultat void

CreateRole() public méthode

Creates the role.
public CreateRole ( string rolename ) : void
rolename string The rolename.
Résultat void

DeleteRole() public méthode

Deletes the role.
public DeleteRole ( string rolename, bool throwOnPopulatedRole ) : bool
rolename string The rolename.
throwOnPopulatedRole bool if set to true [throw on populated role].
Résultat bool

FindUsersInRole() public méthode

Finds the users in role.
public FindUsersInRole ( string rolename, string usernameToMatch ) : string[]
rolename string The rolename.
usernameToMatch string The username to match.
Résultat string[]

GetAllRoles() public méthode

Gets a list of all the roles for the configured applicationName.
public GetAllRoles ( ) : string[]
Résultat string[]

GetRolesForUser() public méthode

Gets a list of the roles that a specified user is in for the configured applicationName.
public GetRolesForUser ( string username ) : string[]
username string The user to return a list of roles for.
Résultat string[]

GetUsersInRole() public méthode

Gets the users in role.
public GetUsersInRole ( string rolename ) : string[]
rolename string The rolename.
Résultat string[]

Initialize() public méthode

Initializes the provider.
The name of the provider is null. The name of the provider has a length of zero. An attempt is made to call on a provider after the provider has already been initialized.
public Initialize ( string name, NameValueCollection config ) : void
name string The friendly name of the provider.
config System.Collections.Specialized.NameValueCollection A collection of the name/value pairs representing the provider-specific attributes specified in the configuration for this provider.
Résultat void

IsUserInRole() public méthode

Determines whether [is user in role] [the specified username].
public IsUserInRole ( string username, string rolename ) : bool
username string The username.
rolename string The rolename.
Résultat bool

RemoveUsersFromRoles() public méthode

Removes the users from roles.
public RemoveUsersFromRoles ( string usernames, string rolenames ) : void
usernames string The usernames.
rolenames string The rolenames.
Résultat void

RoleExists() public méthode

Roles the exists.
public RoleExists ( string rolename ) : bool
rolename string The rolename.
Résultat bool