public StorageService(
     OSSApiService ossApiService,
     AppsContainer appsContainer)
 {
     _ossApiService = ossApiService;
     _appsContainer = appsContainer;
 }
Exemple #2
0
 public AppsController(
     UserManager <DeveloperUser> userManager,
     SignInManager <DeveloperUser> signInManager,
     ILoggerFactory loggerFactory,
     DeveloperDbContext dbContext,
     ServiceLocation serviceLocation,
     StorageService storageService,
     OSSApiService ossApiService,
     AppsContainer appsContainer,
     CoreApiService coreApiService,
     IConfiguration configuration,
     SitesService siteService)
 {
     _userManager     = userManager;
     _signInManager   = signInManager;
     _logger          = loggerFactory.CreateLogger <AppsController>();
     _dbContext       = dbContext;
     _serviceLocation = serviceLocation;
     _storageService  = storageService;
     _ossApiService   = ossApiService;
     _appsContainer   = appsContainer;
     _coreApiService  = coreApiService;
     _configuration   = configuration;
     _siteService     = siteService;
 }
 public BucketController(
     DeveloperDbContext dbContext,
     AppsContainer appsContainer,
     OSSApiService ossApiService)
 {
     _dbContext     = dbContext;
     _appsContainer = appsContainer;
     _ossApiService = ossApiService;
 }
Exemple #4
0
 public StorageService(
     OSSApiService ossApiService,
     AppsContainer appsContainer,
     FilesService filesService)
 {
     _ossApiService = ossApiService;
     _appsContainer = appsContainer;
     _filesService  = filesService;
 }
Exemple #5
0
 public StorageService(
     OSSApiService ossApiService,
     AppsContainer appsContainer,
     FilesService filesService,
     ServiceLocation serviceLocation)
 {
     _ossApiService   = ossApiService;
     _appsContainer   = appsContainer;
     _filesService    = filesService;
     _serviceLocation = serviceLocation;
 }
Exemple #6
0
        public static async Task <ViewAppViewModel> SelfCreateAsync(
            DeveloperUser User,
            App ThisApp,
            CoreApiService coreApiService,
            OSSApiService ossApiService,
            AppsContainer appsContainer)
        {
            var model = new ViewAppViewModel(User, ThisApp);
            await model.Recover(User, ThisApp, coreApiService, ossApiService, appsContainer);

            return(model);
        }
Exemple #7
0
 public DashboardController(
     UserManager <ColossusUser> userManager,
     ColossusDbContext dbContext,
     OSSApiService ossApiService,
     IConfiguration configuration,
     StorageService storageService)
 {
     _userManager    = userManager;
     _dbContext      = dbContext;
     _ossApiService  = ossApiService;
     _configuration  = configuration;
     _storageService = storageService;
 }
 public BucketController(
     UserManager <DeveloperUser> userManager,
     SignInManager <DeveloperUser> signInManager,
     ILoggerFactory loggerFactory,
     DeveloperDbContext dbContext,
     AppsContainer appsContainer,
     OSSApiService ossApiService)
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     _logger        = loggerFactory.CreateLogger <BucketController>();
     _dbContext     = dbContext;
     _appsContainer = appsContainer;
     _ossApiService = ossApiService;
 }
Exemple #9
0
        public async Task Recover(
            DeveloperUser User,
            App ThisApp,
            CoreApiService coreApiService,
            OSSApiService ossApiService,
            AppsContainer appsContainer)
        {
            base.Recover(User, 1);
            var token = await appsContainer.AccessToken(ThisApp.AppId, ThisApp.AppSecret);

            var buckets = await ossApiService.ViewMyBucketsAsync(token);

            Buckets = buckets.Buckets;

            var grants = await coreApiService.AllUserGrantedAsync(token);

            Grants = grants.Grants;
        }
Exemple #10
0
 public FilesController(
     UserManager <DeveloperUser> userManager,
     SignInManager <DeveloperUser> signInManager,
     ILoggerFactory loggerFactory,
     DeveloperDbContext dbContext,
     OSSApiService ossApiService,
     StorageService storageService,
     AppsContainer appsContainer,
     SecretService secretService)
 {
     _userManager    = userManager;
     _signInManager  = signInManager;
     _logger         = loggerFactory.CreateLogger <FilesController>();
     _dbContext      = dbContext;
     _ossApiService  = ossApiService;
     _storageService = storageService;
     _appsContainer  = appsContainer;
     _secretService  = secretService;
 }
        public async Task Recover(
            DeveloperUser user,
            App thisApp,
            CoreApiService coreApiService,
            OSSApiService ossApiService,
            AppsContainer appsContainer,
            SitesService sitesService)
        {
            base.RootRecover(user, 1);
            var token = await appsContainer.AccessToken(thisApp.AppId, thisApp.AppSecret);

            var buckets = await ossApiService.ViewMyBucketsAsync(token);

            Buckets = buckets.Buckets;

            var grants = await coreApiService.AllUserGrantedAsync(token);

            Grants = grants.Grants;

            var sites = await sitesService.ViewMySitesAsync(token);

            Sites = sites.Sites;
        }