コード例 #1
0
 public override string[] GetUsersInRole(string roleName)
 {
     var service = new GrassrootsRoleService();
     return service.GetUsersInRole( roleName );
 }
コード例 #2
0
 public override string[] GetAllRoles()
 {
     var service = new GrassrootsRoleService();
     return service.GetAllRoles();
 }
コード例 #3
0
 public override string[] GetRolesForUser(string username)
 {
     var service = new GrassrootsRoleService();
     return service.GetRolesForUser( username );
 }
コード例 #4
0
 public override bool DeleteRole(string roleName, bool throwOnPopulatedRole)
 {
     var service = new GrassrootsRoleService();
     return service.DeleteRole( roleName, throwOnPopulatedRole );
 }
コード例 #5
0
 /// <summary>
 /// Gets an array of user names in a role where the user name contains the specified user name to match.
 /// </summary>
 /// <param name="roleName"></param>
 /// <param name="usernameToMatch"></param>
 /// <returns>an array of usernames</returns>
 public override string[] FindUsersInRole(string roleName, string usernameToMatch)
 {
     var service = new GrassrootsRoleService();
     return service.FindUsersInRole( roleName, usernameToMatch );
 }
コード例 #6
0
 public override void CreateRole(string roleName)
 {
     var service = new GrassrootsRoleService();
     service.CreateRole( roleName );
 }
コード例 #7
0
 /// <summary>
 /// 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.
 /// </summary>
 /// <param name="usernames">an array of userNames</param>
 /// <param name="roleNames">an array of roleNames (only 1 role is supported).</param>
 /// <exception cref="System.InvalidOperationException">Thrown if you call this method with more than one role.</exception>  
 public override void AddUsersToRoles(string[] usernames, string[] roleNames)
 {
     var service = new GrassrootsRoleService();
     service.AddUsersToRoles( usernames, roleNames );
 }
コード例 #8
0
 public override bool RoleExists( string roleName )
 {
     var service = new GrassrootsRoleService();
     return service.RoleExists( roleName );
 }
コード例 #9
0
 /// <summary>
 /// 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.
 /// </summary>
 /// <param name="usernames">an array of userNames</param>
 /// <param name="roleNames">an array of roleNames (only 1 role is supported).</param>
 /// <exception cref="System.InvalidOperationException">Thrown if you call this method with more than one role.</exception>  
 public override void RemoveUsersFromRoles(string[] usernames, string[] roleNames)
 {
     var service = new GrassrootsRoleService();
     service.RemoveUsersFromRoles( usernames, roleNames );
 }
コード例 #10
0
 public override bool IsUserInRole(string username, string roleName)
 {
     var service = new GrassrootsRoleService();
     return service.IsUserInRole( username, roleName );
 }