/// <summary>
 /// Constructor
 /// </summary>
 /// <param name="giteaApiWrapper">IGitea</param>
 /// <param name="httpContextAccessor">IHttpContextAccessor</param>
 public GiteaPushPermissionHandler(
     IGitea giteaApiWrapper,
     IHttpContextAccessor httpContextAccessor)
 {
     _httpContext     = httpContextAccessor.HttpContext;
     _giteaApiWrapper = giteaApiWrapper;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceCatalogueController"/> class
 /// </summary>
 /// <param name="repositoryService">The repository service</param>
 /// <param name="logger">The logger</param>
 /// <param name="repositorySettings">the repository setting servie handler</param>
 /// <param name="giteaWrapper">the gitea wrapper handler</param>
 /// <param name="httpContextAccessor">the http context accessor</param>
 public ServiceCatalogueController(IRepository repositoryService, ILogger <ServiceCatalogueController> logger, IOptions <ServiceRepositorySettings> repositorySettings, IGitea giteaWrapper, IHttpContextAccessor httpContextAccessor)
 {
     _repository = repositoryService;
     _logger     = logger;
     _settings   = repositorySettings.Value;
     _giteaApi   = giteaWrapper;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HomeController"/> class
 /// </summary>
 /// <param name="logger">The logger</param>
 /// <param name="repositorySettings">settings for the repository</param>
 /// <param name="giteaWrapper">the gitea wrapper</param>
 /// <param name="httpContextAccessor">the httpcontext accessor</param>
 /// <param name="sourceControl">the source control</param>
 public HomeController(ILogger <HomeController> logger, IOptions <ServiceRepositorySettings> repositorySettings, IGitea giteaWrapper, IHttpContextAccessor httpContextAccessor, ISourceControl sourceControl)
 {
     _logger        = logger;
     _settings      = repositorySettings.Value;
     _giteaApi      = giteaWrapper;
     _sourceControl = sourceControl;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RepositoryController"/> class.
 /// </summary>
 /// <param name="giteaWrapper">the gitea wrapper</param>
 /// <param name="repositorySettings">Settings for repository</param>
 /// <param name="sourceControl">the source control</param>
 /// <param name="repository">the repository control</param>
 /// <param name="httpContextAccessor">the http context accessor</param>
 public RepositoryController(IGitea giteaWrapper, IOptions <ServiceRepositorySettings> repositorySettings, ISourceControl sourceControl, IRepository repository, IHttpContextAccessor httpContextAccessor)
 {
     _giteaApi            = giteaWrapper;
     _settings            = repositorySettings.Value;
     _sourceControl       = sourceControl;
     _repository          = repository;
     _httpContextAccessor = httpContextAccessor;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="repositorySettings">IOptions of type ServiceRepositorySettings</param>
 /// <param name="giteaApiWrapper">IGitea</param>
 /// <param name="authorizationPolicyClient">IAltinnAuthorizationPolicyClient</param>
 public AuthorizationPolicyService(
     IOptions <ServiceRepositorySettings> repositorySettings,
     IGitea giteaApiWrapper,
     IAltinnAuthorizationPolicyClient authorizationPolicyClient)
 {
     _giteaApiWrapper           = giteaApiWrapper;
     _authorizationPolicyClient = authorizationPolicyClient;
     _serviceRepositorySettings = repositorySettings.Value;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="giteaApiWrapper">IGitea</param>
 /// <param name="httpContextAccessor">IHttpContextAccessor</param>
 /// <param name="settings">The general settings</param>
 public GiteaDeployPermissionHandler(
     IGitea giteaApiWrapper,
     IHttpContextAccessor httpContextAccessor,
     IOptions <GeneralSettings> settings)
 {
     _httpContext     = httpContextAccessor.HttpContext;
     _giteaApiWrapper = giteaApiWrapper;
     _settings        = settings.Value;
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="giteaApiWrapper">IGitea</param>
 /// <param name="logger">ILogger of type TextResourceService</param>
 /// <param name="storageTextResourceClient">IAltinnStorageTextResourceClient</param>
 public TextResourceService(
     IGitea giteaApiWrapper,
     ILogger <TextResourceService> logger,
     IAltinnStorageTextResourceClient storageTextResourceClient)
 {
     _giteaApiWrapper           = giteaApiWrapper;
     _logger                    = logger;
     _storageTextResourceClient = storageTextResourceClient;
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RepositorySI"/> class
 /// </summary>
 /// <param name="repositorySettings">The settings for the service repository</param>
 /// <param name="generalSettings">The current general settings</param>
 /// <param name="defaultFileFactory">The default factory</param>
 public SourceControlSI(IOptions <ServiceRepositorySettings> repositorySettings,
                        IOptions <GeneralSettings> generalSettings, IDefaultFileFactory defaultFileFactory, IHttpContextAccessor httpContextAccessor, IGitea gitea)
 {
     _defaultFileFactory  = defaultFileFactory;
     _settings            = repositorySettings.Value;
     _generalSettings     = generalSettings.Value;
     _httpContextAccessor = httpContextAccessor;
     _gitea = gitea;
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Constructor
 /// </summary>
 public ApplicationInformationService(
     IApplicationMetadataService applicationMetadataService,
     IAuthorizationPolicyService authorizationPolicyService,
     IGitea giteaApiWrapper)
 {
     _applicationMetadataService = applicationMetadataService;
     _authorizationPolicyService = authorizationPolicyService;
     _giteaApiWrapper            = giteaApiWrapper;
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ManualTestingController"/> class
 /// </summary>
 /// <param name="testdataService">The testDataService (configured in Startup.cs)</param>
 /// <param name="profileService">The profileService (configured in Startup.cs)</param>
 /// <param name="registerService">The registerService (configured in Startup.cs)</param>
 /// <param name="authorizationService">The authorizationService (configured in Startup.cs)</param>
 public ManualTestingController(ITestdata testdataService, IProfile profileService, IRegister registerService,
                                IAuthorization authorizationService, IOptions <ServiceRepositorySettings> repositorySettings, IGitea giteaWrapper)
 {
     _testdata      = testdataService;
     _profile       = profileService;
     _register      = registerService;
     _authorization = authorizationService;
     _userHelper    = new UserHelper(_profile, _register);
     _settings      = repositorySettings.Value;
     _giteaApi      = giteaWrapper;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="giteaApiWrapper">IGitea</param>
 /// <param name="repositorySettings">IOptions of type ServiceRepositorySettings</param>
 /// <param name="logger">ILogger of type ApplicationMetadataService</param>
 /// <param name="storageAppMetadataClient">IAltinnStorageAppMetadataClient</param>
 public ApplicationMetadataService(
     IGitea giteaApiWrapper,
     IOptions <ServiceRepositorySettings> repositorySettings,
     ILogger <ApplicationMetadataService> logger,
     IAltinnStorageAppMetadataClient storageAppMetadataClient)
 {
     _giteaApiWrapper           = giteaApiWrapper;
     _logger                    = logger;
     _storageAppMetadataClient  = storageAppMetadataClient;
     _serviceRepositorySettings = repositorySettings.Value;
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DeployController"/> class
 /// </summary>
 /// <param name="sourceControl">The source control service</param>
 /// <param name="configuration">The configuration service</param>
 /// <param name="giteaAPI">The gitea api service</param>
 /// <param name="logger">The logger</param>
 /// <param name="settings">The settings service</param>
 public DeployController(
     ISourceControl sourceControl,
     IConfiguration configuration,
     IGitea giteaAPI,
     ILogger <DeployController> logger,
     IOptions <ServiceRepositorySettings> settings)
 {
     _sourceControl = sourceControl;
     _configuration = configuration;
     _giteaAPI      = giteaAPI;
     _logger        = logger;
     _settings      = settings.Value;
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SourceControlSI"/> class.
 /// </summary>
 /// <param name="repositorySettings">The settings for the service repository.</param>
 /// <param name="generalSettings">The current general settings.</param>
 /// <param name="defaultFileFactory">The default factory.</param>
 /// <param name="httpContextAccessor">the http context accessor.</param>
 /// <param name="gitea">gitea.</param>
 /// <param name="logger">the log handler.</param>
 public SourceControlSI(
     IOptions <ServiceRepositorySettings> repositorySettings,
     IOptions <GeneralSettings> generalSettings,
     IDefaultFileFactory defaultFileFactory,
     IHttpContextAccessor httpContextAccessor,
     IGitea gitea,
     ILogger <SourceControlSI> logger)
 {
     _settings            = repositorySettings.Value;
     _httpContextAccessor = httpContextAccessor;
     _gitea  = gitea;
     _logger = logger;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ManualTestingController"/> class
 /// </summary>
 /// <param name="httpContextAccessor">the http context accessor service</param>
 /// <param name="profile">the profile service</param>
 /// <param name="register">the register service</param>
 /// <param name="authorization">the authorization service</param>
 /// <param name="testdata">the testdata service</param>
 /// <param name="serviceRepositorySettings">the service repository settings</param>
 /// <param name="generalSettings">the general settings</param>
 /// <param name="giteaApi">the gitea api</param>
 /// <param name="workflow">the workflow</param>
 public ManualTestingController(IHttpContextAccessor httpContextAccessor, IProfile profile, IRegister register, IAuthorization authorization, ITestdata testdata, IOptions <ServiceRepositorySettings> serviceRepositorySettings, IOptions <GeneralSettings> generalSettings, IGitea giteaApi, IWorkflow workflow)
 {
     _httpContextAccessor       = httpContextAccessor;
     _register                  = register;
     _profile                   = profile;
     _userHelper                = new UserHelper(_profile, _register);
     _authorization             = authorization;
     _testdata                  = testdata;
     _serviceRepositorySettings = serviceRepositorySettings.Value;
     _generalSettings           = generalSettings.Value;
     _giteaApi                  = giteaApi;
     _workflow                  = workflow;
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HomeController"/> class
 /// </summary>
 /// <param name="logger">The logger</param>
 /// <param name="repositorySettings">settings for the repository</param>
 /// <param name="generalSettings">the general settings</param>
 /// <param name="giteaWrapper">the gitea wrapper</param>
 /// <param name="sourceControl">the source control</param>
 public HomeController(
     ILogger <HomeController> logger,
     IOptions <ServiceRepositorySettings> repositorySettings,
     IOptions <GeneralSettings> generalSettings,
     IGitea giteaWrapper,
     ISourceControl sourceControl)
 {
     _logger          = logger;
     _settings        = repositorySettings.Value;
     _generalSettings = generalSettings.Value;
     _giteaApi        = giteaWrapper;
     _sourceControl   = sourceControl;
 }
Ejemplo n.º 16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DeployController"/> class
 /// </summary>
 /// <param name="sourceControl">The source control service</param>
 /// <param name="configuration">The configuration service</param>
 /// <param name="giteaAPI">The gitea api service</param>
 /// <param name="logger">The logger</param>
 /// <param name="settings">The settings service</param>
 /// <param name="platformSettings">The platform settings</param>
 /// <param name="repositoryService">the repository service</param>
 public DeployController(
     ISourceControl sourceControl,
     IConfiguration configuration,
     IGitea giteaAPI,
     ILogger <DeployController> logger,
     IOptions <GeneralSettings> settings,
     IOptions <PlatformSettings> platformSettings,
     IRepository repositoryService)
 {
     _sourceControl    = sourceControl;
     _configuration    = configuration;
     _giteaAPI         = giteaAPI;
     _logger           = logger;
     _settings         = settings.Value;
     _platformSettings = platformSettings.Value;
     _repository       = repositoryService;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ManualTestingController"/> class
 /// </summary>
 /// <param name="testdataService">The testDataService (configured in Startup.cs)</param>
 /// <param name="profileService">The profileService (configured in Startup.cs)</param>
 /// <param name="registerService">The registerService (configured in Startup.cs)</param>
 /// <param name="authorizationService">The authorizationService (configured in Startup.cs)</param>
 /// <param name="repositorySettings">the repository setting service handler</param>
 /// <param name="giteaWrapper">the gitea wrapper handler</param>
 /// <param name="contextAccessor">The http context accessor</param>
 /// <param name="execution">The executionSI</param>
 /// <param name="testdataRepositorySettings">The test data settings</param>
 /// <param name="workflowSI">The workflowSI</param>
 public ManualTestingController(
     ITestdata testdataService,
     IProfile profileService,
     IRegister registerService,
     IAuthorization authorizationService,
     IOptions <ServiceRepositorySettings> repositorySettings,
     IGitea giteaWrapper,
     IExecution execution,
     IHttpContextAccessor contextAccessor,
     IOptions <TestdataRepositorySettings> testdataRepositorySettings,
     IWorkflowSI workflowSI)
 {
     _testdata                   = testdataService;
     _profile                    = profileService;
     _register                   = registerService;
     _authorization              = authorizationService;
     _userHelper                 = new UserHelper(_profile, _register);
     _settings                   = repositorySettings.Value;
     _giteaApi                   = giteaWrapper;
     _execution                  = execution;
     _httpContextAccessor        = contextAccessor;
     _testdataRepositorySettings = testdataRepositorySettings.Value;
     _workflowSI                 = workflowSI;
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="deploymentService">IDeploymentService</param>
 /// <param name="pipelineService">IPipelineService</param>
 /// <param name="giteaService">IGiteaService</param>
 public DeploymentsController(IDeploymentService deploymentService, IPipelineService pipelineService, IGitea giteaService)
 {
     _deploymentService = deploymentService;
     _pipelineService   = pipelineService;
     _giteaService      = giteaService;
 }
Ejemplo n.º 19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UserController"/> class.
 /// </summary>
 /// <param name="giteaWrapper">the gitea wrapper</param>
 /// <param name="repositorySettings">Settings for repository</param>
 /// <param name="antiforgery">Access to the antiforgery system in .NET Core</param>
 public UserController(IGitea giteaWrapper, IOptions <ServiceRepositorySettings> repositorySettings, IAntiforgery antiforgery)
 {
     _giteaApi    = giteaWrapper;
     _settings    = repositorySettings.Value;
     _antiforgery = antiforgery;
 }
Ejemplo n.º 20
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="deploymentService">IDeploymentService</param>
 /// <param name="giteaService">IGiteaService</param>
 public DeploymentsController(IDeploymentService deploymentService, IGitea giteaService)
 {
     _deploymentService = deploymentService;
     _giteaService      = giteaService;
 }
Ejemplo n.º 21
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UserController"/> class.
 /// </summary>
 /// <param name="giteaWrapper">the gitea wrapper</param>
 /// <param name="repositorySettings">Settings for repository</param>
 public UserController(IGitea giteaWrapper, IOptions <ServiceRepositorySettings> repositorySettings)
 {
     _giteaApi = giteaWrapper;
     _settings = repositorySettings.Value;
 }