public void RemoveUserAccount(Guid userId, AccountType type, string name) { userContext.CheckPermission(Permissions.UserMaintenance); var command = new RemoveUserAccountCommand(userId, type, name); commandBus.Value.Send(Envelope.Create(command)); }
public Guid AddUser(string accountName, AccountType type, string displayName, IEnumerable<string> authenticatedGroups, IEnumerable<KeyValuePair<string, string>> customProperties) { Guid userId = Guid.NewGuid(); var properties = customProperties != null ? customProperties.ToList() : null; var createUserCommand = new CreateUserCommand(userId, displayName, properties); commandBus.Value.Send(Envelope.Create(createUserCommand)); var createAccountCommand = new CreateExternalUserAccountCommand(userId, type, accountName); commandBus.Value.Send(Envelope.Create(createAccountCommand)); SetRolesAndGroups(userId, authenticatedGroups); return userId; }
public Guid AddUser(string accountName, AccountType type, string displayName, IEnumerable <string> authenticatedGroups, IEnumerable <KeyValuePair <string, string> > customProperties) { Guid userId = Guid.NewGuid(); var properties = customProperties != null?customProperties.ToList() : null; var createUserCommand = new CreateUserCommand(userId, displayName, properties); commandBus.Value.Send(Envelope.Create(createUserCommand)); var createAccountCommand = new CreateExternalUserAccountCommand(userId, type, accountName); commandBus.Value.Send(Envelope.Create(createAccountCommand)); SetRolesAndGroups(userId, authenticatedGroups); return(userId); }
public IEnumerable <IUser> GetUsers(string customPropertyName, string customPropertyValue, AccountType accountType) { var mapper = new UserMapper(); return(mapper.Map(queryService.GetUsers(customPropertyName, customPropertyValue, (Querying.Data.AccountType)accountType))); }
public bool IsExistingUserAccount(string accountName, AccountType type) { userContext.CheckPermission(Permissions.UserMaintenance); return(queryService.IsExistingUser(accountName, (Querying.Data.AccountType)type)); }
public void UpdateUserGroupsAndRoles(string accountName, AccountType accountType, IEnumerable<string> authenticatedGroups) { Guid userId = GetUser(accountName, accountType).Id; SetRolesAndGroups(userId, authenticatedGroups); }
public bool IsExistingUserAccount(string accountName, AccountType accountType) { return queryService.IsExistingUser(accountName, (Querying.Data.AccountType)accountType); }
public IUser GetUser(string accountName, AccountType accountType) { var mapper = new UserMapper(); return mapper.Map(queryService.GetUser(accountName, (Querying.Data.AccountType)accountType)); }
public Guid AddUser(string accountName, AccountType type, string displayName, IEnumerable<string> authenticatedGroups) { return AddUser(accountName, type, displayName, authenticatedGroups, null); }
public void UpdateUserGroupsAndRoles(string accountName, AccountType accountType, IEnumerable <string> authenticatedGroups) { Guid userId = GetUser(accountName, accountType).Id; SetRolesAndGroups(userId, authenticatedGroups); }
public Guid AddUser(string accountName, AccountType type, string displayName, IEnumerable <string> authenticatedGroups) { return(AddUser(accountName, type, displayName, authenticatedGroups, null)); }
public IUser GetUser(string accountName, AccountType accountType) { var mapper = new UserMapper(); return(mapper.Map(queryService.GetUser(accountName, (Querying.Data.AccountType)accountType))); }
public bool IsExistingUserAccount(string accountName, AccountType accountType) { return(queryService.IsExistingUser(accountName, (Querying.Data.AccountType)accountType)); }