public void CreateAdministratorAccount() { // TODO: figure out how we an create the UoW w/o doing this this.Uow = new ObsequyUow(new RepositoryProvider(new RepositoryFactories())); // ?? we should probably put this in the web config var form = new AdministratorRegistrationForm() { Member = new AdminMember() { Email = "*****@*****.**", FirstName = "Big", LastName = "Daddy", IsNotifiedOnConsumerRegistrations = true, IsNotifiedOnProviderRegistrations = true, IsNotifiedOnAcceptedResponses = true, IsNotifiedOnExceptions = false }, Password = "******", ConfirmPassword = "******", }; if (!WebSecurity.UserExists(form.Member.Email)) { // register this account CreateMember(form); // add appropriate roles to the account var roles = new string[2] { Definitions.Account.Roles.Elevated, Definitions.Account.Roles.Administrator }; AddRolesToUser(form.Member.Email, roles); } }
public BaseApiController(IObsequyUow uow) : base() { this.Uow = uow; this.Uow.AccountSession = this.AccountSession; this.Uow.Switchboard = this.Switchboard; }
public AccountController(IObsequyUow uow) : base(uow) { }
public ResponseController(IObsequyUow uow) : base(uow) { }
public AdministratorController(IObsequyUow uow) : base(uow) { }
public ProviderController(IObsequyUow uow) : base(uow) { }
public ValidationController(IObsequyUow uow) : base(uow) { }
public ConsumerController(IObsequyUow uow) : base(uow) { }