C# Class MongoUtility.Security.MongoUserEx

Show file Open project: magicdict/MongoCola Class Usage Examples

Public Properties

Property Type Description
Password string
Roles List
Username string
customData BsonDocument

Public Methods

Method Description
AddUser ( MongoUserEx user, bool IsAdmin ) : CommandResult

增加用户

GetCurrentDbRoles ( string connectionName, string dbName ) : List

获得用户当前角色

RemoveUserFromSystem ( string strUser, bool isAdmin ) : void

Remove A User From Admin database

UpdateUser ( MongoUserEx user, bool IsAdmin ) : CommandResult

修改用户

Method Details

AddUser() public static method

增加用户
public static AddUser ( MongoUserEx user, bool IsAdmin ) : CommandResult
user MongoUserEx
IsAdmin bool
return MongoDB.Driver.CommandResult

GetCurrentDbRoles() public static method

获得用户当前角色
public static GetCurrentDbRoles ( string connectionName, string dbName ) : List
connectionName string
dbName string
return List

RemoveUserFromSystem() public static method

Remove A User From Admin database
public static RemoveUserFromSystem ( string strUser, bool isAdmin ) : void
strUser string UserName
isAdmin bool
return void

UpdateUser() public static method

修改用户
public static UpdateUser ( MongoUserEx user, bool IsAdmin ) : CommandResult
user MongoUserEx
IsAdmin bool
return MongoDB.Driver.CommandResult

Property Details

Password public property

密码
public string Password
return string

Roles public property

角色
public List Roles
return List

Username public property

用户
public string Username
return string

customData public property

自定义数据
public BsonDocument customData
return BsonDocument