Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui): option to disable workflow editor (#11391) #13840

Closed
wants to merge 1 commit into from

Conversation

tooptoop4
Copy link
Contributor

Fixes #11391

@Joibel
Copy link
Member

Joibel commented Oct 30, 2024

As discussed by agilgur5 in #11391 this doesn't prevent submission of arbitrary workflows and there is already a mechanism that does.

@tooptoop4
Copy link
Contributor Author

templateReferencing is too basic, doesn't allow certain superusers to not use template ie via cli

@@ -21,6 +21,7 @@ export function WorkflowCreator({namespace, onCreate}: {namespace: string; onCre
const [stage, setStage] = useState<Stage>('choose-method');
const [workflow, setWorkflow] = useState<Workflow>();
const [error, setError] = useState<Error>();
const isFullEditorDisabled = process.env.UI_DISABLE_FULL_EDITOR === 'true';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, this isn't going to work, because this file is executed by the browser, and process is only valid in a NodeJS context. There's no way for the browser to know what environment variables are defined at the server level without an API call.

How did you test this? I ask because you should have seen a "process is not defined" error immediately on loading the workflow creator. If you didn't see an error, then something is probably wrong with your local environment.

@tooptoop4 tooptoop4 marked this pull request as draft October 31, 2024 07:31
@tooptoop4 tooptoop4 closed this Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI: Env variable to hide yaml submission
3 participants