public async Task <IActionResult> GetOrganizationById(Guid organizationId)
        {
            var organization = await _organizationQueryService.GetOrganizationById(organizationId);

            if (organization == null)
            {
                return(this.NotFound());
            }

            var projects = await this._projectQueryService.GetProjectsWithServices(organizationId);

            var configurationManagementServices = await _organizationCMSQueryService.GetOrganizationConfigurationManagementServices(organizationId, Domain.Models.Enums.CMSConnectionType.ProjectLevel);

            var cloudProviderServices = await _organizationCPSQueryService.GetOrganizationCloudProviderServices(organizationId);

            var users = await _organizationUserQueryService.GetUsers(organizationId);

            var invitations = await _organizationUserInvitationQueryService.GetInvitations(organizationId);

            var model = new {
                organization = organization,
                projects     = projects,
                cms          = configurationManagementServices,
                cps          = cloudProviderServices,
                users        = users,
                invitations  = invitations
            };

            return(this.Ok(model));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> GetUsers(Guid organizationId)
        {
            var invitations = await _organizationUserQueryService.GetUsers(organizationId);

            if (_domainManagerService.HasNotFounds())
            {
                return(this.NotFound(_domainManagerService.GetNotFounds()));
            }

            if (_domainManagerService.HasForbidden())
            {
                return(this.Forbidden(_domainManagerService.GetForbidden()));
            }

            return(this.Ok(invitations));
        }