Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend/web/components/IntegrationList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ const IntegrationList: FC<IntegrationListProps> = (props) => {
setIsLoading(false)
})
const params = Utils.fromParam()
if (params && params.configure) {
if (params?.configure && props.integrations.includes(params.configure)) {
const integrationList = Utils.getIntegrationData()

if (integrationList && integrationList[params.configure]) {
Expand Down Expand Up @@ -543,7 +543,7 @@ const IntegrationList: FC<IntegrationListProps> = (props) => {
: null
}
githubMeta={{ githubId: githubId, installationId: installationId }}
projectId={props.projectId}
projectId={params.project || props.projectId}
requiresProjectSelection={requiresProjectSelection}
onComplete={(result) => {
if (requiresProjectSelection && result?.projectId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,11 @@ const CreateEditIntegration: FC<CreateEditIntegrationProps> = (props) => {
const handleOauthSignature = (res: { signature: string } | null) => {
const signature = res && res.signature
if (signature) {
const returnUrl = `${document.location.href}?environment=${
formData.flagsmithEnvironment
}&configure=${id}${projectId ? `&project=${projectId}` : ''}`
const postfix = `?redirect_url=${encodeURIComponent(
`${document.location.href}?environment=${formData.flagsmithEnvironment}&configure=${id}`,
returnUrl,
)}&signature=${signature}`
document.location = `${constructBaseUrl({
environmentApiKey: formData.flagsmithEnvironment,
Expand Down Expand Up @@ -483,6 +486,7 @@ const CreateEditIntegration: FC<CreateEditIntegrationProps> = (props) => {
</label>
<ProjectSelect
organisationId={AccountStore.getOrganisation()?.id}
readOnly={authorised}
Comment thread
Zaimwa9 marked this conversation as resolved.
value={selectedProjectId}
onChange={(v) => setSelectedProjectId(v)}
/>
Expand All @@ -495,7 +499,7 @@ const CreateEditIntegration: FC<CreateEditIntegrationProps> = (props) => {
</label>
<EnvironmentSelect
projectId={projectId}
readOnly={!!data}
readOnly={!!data?.id}
Comment thread
Zaimwa9 marked this conversation as resolved.
value={formData.flagsmithEnvironment}
onChange={(environment) =>
update('flagsmithEnvironment', environment)
Expand Down
Loading