예제 #1
0
 public UsersController(
     UserManager <User> userManager,
     IUserAdminService users)
 {
     this.userManager = userManager;
     this.users       = users;
 }
예제 #2
0
 public UsersController(UserManager <User> userManager, SignInManager <User> signInManager,
                        IUserAdminService userAdminService, IMapper mapper) : base(userManager,
                                                                                   signInManager, mapper)
 {
     this.userAdminService = userAdminService;
     this.mapper           = mapper;
 }
예제 #3
0
 public void Dispose()
 {
     if (_service!=null && _service is IDisposable)
     {
         (_service as IDisposable).Dispose();
         _service = null;
     }
 }
예제 #4
0
 public void Dispose()
 {
     if (_service != null && _service is IDisposable)
     {
         (_service as IDisposable).Dispose();
         _service = null;
     }
 }
예제 #5
0
        public async Task <string> GetRandomUser(IUserAdminService userService)
        {
            var users = await userService.GetUsersAsync(null).ConfigureAwait(false);

            var user = users.MSummaries.Summaries[m_random.Next(users.MSummaries.Summaries.Count)];

            return(user.UserId);
        }
 public UserAdminController(ILogger <UserAdminController> logger,
                            IMapper mapper,
                            IUserAdminService userAdminService, IUploadPic uploadPicService, IUserService userService)
 {
     this.Logger           = logger ?? throw new ArgumentNullException(nameof(logger));
     this.mapper           = mapper;
     this.userAdminService = userAdminService;
     this.uploadPicService = uploadPicService;
     this.userService      = userService;
 }
예제 #7
0
 public UserAdminController(
     ILogger <UserAdminController> logger
     , IUserAdminService userAdminService
     , UserManager <ApplicationIdentityUser> userManager
     )
 {
     _logger           = logger;
     _userAdminService = userAdminService;
     _userManager      = userManager;
 }
예제 #8
0
 public UserController(
     IApplicationLocale applicationLocale,
     IDomainMicroService domainMicroService,
     IUserAdminService userAdminService)
     : base(
         applicationLocale,
         domainMicroService)
 {
     UserAdminService = userAdminService ?? throw new ArgumentNullException(nameof(userAdminService));
 }
 public UserAdminController(
     IUserAdminService userAdminService,
     IHttpContextAccessor httpContextAccessor,
     ApplicationContext applicationContext,
     ILogger <UserAdminController> logger)
 {
     _userAdminService    = userAdminService;
     _logger              = logger;
     _httpContextAccessor = httpContextAccessor;
     _applicationContext  = applicationContext;
 }
예제 #10
0
 private void InitService()
 {
     _svc = new UserAdminService(
         _db.Object,
         _mapper,
         _logger.Object,
         _userContext.Object,
         _securityService.Object,
         _topsLoadshopApiService.Object,
         GetCacheManager());
 }
 public ShipperAdminService(LoadshopDataContext context, ISecurityService securityService, IMapper mapper,
                            ITopsLoadshopApiService topsLoadshopApiService, IUserAdminService userAdminService,
                            INotificationService notificationService, IUserContext userContext)
 {
     _context                = context;
     _securityService        = securityService;
     _mapper                 = mapper;
     _topsLoadshopApiService = topsLoadshopApiService;
     _userAdminService       = userAdminService;
     _notificationService    = notificationService;
     _userContext            = userContext;
 }
예제 #12
0
 public UserAdminController(IUserAdminService userAdminService, IUserContext userContext, ISecurityService securityService) : base(userAdminService)
 {
     _userAdminService = userAdminService;
     _userContext      = userContext;
     _securityService  = securityService;
 }
예제 #13
0
 public AdminController(IUserAdminService adminService)
 {
     this.adminService = adminService;
 }
예제 #14
0
 public ProfileController(IUserAdminService userAdminService, IAccessTokenService tokenService)
 {
     m_admin_service = userAdminService;
     m_token_service = tokenService;
 }
 public AdminUsersController(IUserAdminService usersAdminService)
 {
     this.usersAdminService = usersAdminService;
 }
예제 #16
0
 public UserManagement()
 {
     _service = Platform.GetService <IUserAdminService>();
 }
 public UmbracoUserApiController()
 {
     UserService           = Services.UserService;
     _userAdminService     = new UserAdminService(UserService);
     _expiringPagesService = new ExpiringPagesService(UserService);
 }
 public UserAdminController(IUserAdminService userAdminService)
 {
     _userAdminService = userAdminService;
 }
예제 #19
0
 public UsersController(IUserAdminService users)
 {
     this.users = users;
 }
예제 #20
0
 public UserController(IUserAdminService userService)
 {
     this._userService = userService;
 }
예제 #21
0
 public UserManagement()
 {
     _service = Platform.GetService<IUserAdminService>();
 }
예제 #22
0
        public void TestLoadIarV0p1TempProfiles()
        {
            Assert.Ignore();
            TestHelper.InMethod();
            Console.WriteLine("### Started {0} ###", MethodBase.GetCurrentMethod());

            log4net.Config.XmlConfigurator.Configure();

            string userFirstName  = "Dennis";
            string userLastName   = "Menace";
            UUID   userUuid       = UUID.Parse("00000000-0000-0000-0000-000000000aaa");
            string user2FirstName = "Walter";
            string user2LastName  = "Mitty";

            string itemName = "b.lsl";
            string archiveItemName
                = string.Format("{0}{1}{2}", itemName, "_", UUID.Random());

            MemoryStream     archiveWriteStream = new MemoryStream();
            TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream);

            InventoryItemBase item1 = new InventoryItemBase();

            item1.Name      = itemName;
            item1.AssetID   = UUID.Random();
            item1.GroupID   = UUID.Random();
            item1.CreatorId = OspResolver.MakeOspa(user2FirstName, user2LastName);
            item1.Owner     = UUID.Zero;

            string item1FileName
                = string.Format("{0}{1}", ArchiveConstants.INVENTORY_PATH, archiveItemName);

            tar.WriteFile(item1FileName, UserInventoryItemSerializer.Serialize(item1));
            tar.Close();

            MemoryStream            archiveReadStream = new MemoryStream(archiveWriteStream.ToArray());
            SerialiserModule        serialiserModule  = new SerialiserModule();
            InventoryArchiverModule archiverModule    = new InventoryArchiverModule();

            // Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene
            Scene             scene            = SceneSetupHelpers.SetupScene();
            IUserAdminService userAdminService = scene.CommsManager.UserAdminService;

            SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule);
            userAdminService.AddUser(
                userFirstName, userLastName, "meowfood", String.Empty, 1000, 1000, userUuid);

            archiverModule.DearchiveInventory(userFirstName, userLastName, "/", archiveReadStream);

            // Check that a suitable temporary user profile has been created.
            UserProfileData user2Profile
                = scene.CommsManager.UserService.GetUserProfile(
                      OspResolver.HashName(user2FirstName + " " + user2LastName));

            Assert.That(user2Profile, Is.Not.Null);
            Assert.That(user2Profile.FirstName == user2FirstName);
            Assert.That(user2Profile.SurName == user2LastName);

            CachedUserInfo userInfo
                = scene.CommsManager.UserProfileCacheService.GetUserDetails(userFirstName, userLastName);
            InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName);

            Assert.That(foundItem.CreatorId, Is.EqualTo(item1.CreatorId));
            Assert.That(
                foundItem.CreatorIdAsUuid, Is.EqualTo(OspResolver.HashName(user2FirstName + " " + user2LastName)));
            Assert.That(foundItem.Owner, Is.EqualTo(userUuid));

            Console.WriteLine("### Successfully completed {0} ###", MethodBase.GetCurrentMethod());
        }
예제 #23
0
 public AdminLoginController(IUserAdminService userService)
 {
     this._adminUserService = userService;
 }
예제 #24
0
 public UsersController(IUserAdminService adminService, IKeyVaultAdminService keyVaultAdminService)
 {
     this.adminService         = adminService;
     this.keyVaultAdminService = keyVaultAdminService;
 }
예제 #25
0
 public UserController(IUserAdminService userService, IRoleAdminService roleService, IAuthorityAdminService authorityService)
 {
     this._userService      = userService;
     this._authorityService = authorityService;
     this._roleService      = roleService;
 }
예제 #26
0
 public SurveyController(IUserAdminService userService)
 {
     _userService = userService;
 }
 public UserAdminController(UserManager <User> userManager, IUserAdminService userAdminService, IMapper imapper)
 {
     _userAdminService = userAdminService;
     _userManager      = userManager;
     _imapper          = imapper;
 }
예제 #28
0
        public void TestLoadIarV0p1ExistingUsers()
        {
            Assert.Ignore();
            TestHelper.InMethod();
            Console.WriteLine("Started {0}", MethodBase.GetCurrentMethod());

            //log4net.Config.XmlConfigurator.Configure();

            string userFirstName  = "Mr";
            string userLastName   = "Tiddles";
            UUID   userUuid       = UUID.Parse("00000000-0000-0000-0000-000000000555");
            string user2FirstName = "Lord";
            string user2LastName  = "Lucan";
            UUID   user2Uuid      = UUID.Parse("00000000-0000-0000-0000-000000000666");

            string itemName = "b.lsl";
            string archiveItemName
                = string.Format("{0}{1}{2}", itemName, "_", UUID.Random());

            MemoryStream     archiveWriteStream = new MemoryStream();
            TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream);

            InventoryItemBase item1 = new InventoryItemBase();

            item1.Name      = itemName;
            item1.AssetID   = UUID.Random();
            item1.GroupID   = UUID.Random();
            item1.CreatorId = OspResolver.MakeOspa(user2FirstName, user2LastName);
            //item1.CreatorId = userUuid.ToString();
            //item1.CreatorId = "00000000-0000-0000-0000-000000000444";
            item1.Owner = UUID.Zero;

            string item1FileName
                = string.Format("{0}{1}", ArchiveConstants.INVENTORY_PATH, archiveItemName);

            tar.WriteFile(item1FileName, UserInventoryItemSerializer.Serialize(item1));
            tar.Close();

            MemoryStream            archiveReadStream = new MemoryStream(archiveWriteStream.ToArray());
            SerialiserModule        serialiserModule  = new SerialiserModule();
            InventoryArchiverModule archiverModule    = new InventoryArchiverModule();

            // Annoyingly, we have to set up a scene even though inventory loading has nothing to do with a scene
            Scene             scene            = SceneSetupHelpers.SetupScene();
            IUserAdminService userAdminService = scene.CommsManager.UserAdminService;

            SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule);
            userAdminService.AddUser(
                userFirstName, userLastName, "meowfood", String.Empty, 1000, 1000, userUuid);
            userAdminService.AddUser(
                user2FirstName, user2LastName, "hampshire", String.Empty, 1000, 1000, user2Uuid);

            archiverModule.DearchiveInventory(userFirstName, userLastName, "/", archiveReadStream);

            CachedUserInfo userInfo
                = scene.CommsManager.UserProfileCacheService.GetUserDetails(userFirstName, userLastName);
            InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName);

            Assert.That(foundItem.CreatorId, Is.EqualTo(item1.CreatorId));
            Assert.That(foundItem.CreatorIdAsUuid, Is.EqualTo(user2Uuid));
            Assert.That(foundItem.Owner, Is.EqualTo(userUuid));

            Console.WriteLine("Successfully completed {0}", MethodBase.GetCurrentMethod());
        }