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

Add /projects to a trusted paths configuration #83

Merged
merged 1 commit into from
Feb 7, 2022
Merged

Conversation

vzhukovs
Copy link
Collaborator

@vzhukovs vzhukovs commented Feb 4, 2022

This changes proposal adds default configuration for trusted paths. That contains /projects. To avoid showing the additional dialogs for end user after workspace startup.

fixes eclipse-che/che#21110

To check the changes it is enough to create the workspace from https://github.com/vzhukovs/che-21029
This is Gradle project and after workspace startup the dialog:

image

should not appear.

Signed-off-by: Vladyslav Zhukovskyi vzhukovs@redhat.com

Copy link
Contributor

@benoitf benoitf left a comment

Choose a reason for hiding this comment

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

is it possible to generate that path at runtime (like in the entrypoint ? )

because this is not always /projects, it's $PROJECTS_ROOT

Signed-off-by: Vladyslav Zhukovskyi <vzhukovs@redhat.com>
@vzhukovs
Copy link
Collaborator Author

vzhukovs commented Feb 6, 2022

is it possible to generate that path at runtime (like in the entrypoint ? )

because this is not always /projects, it's $PROJECTS_ROOT

Yes, now it is possible to provide the default configuration with variables using static/default-configuration-provider.sh
The xml configuration moved from the files to variables and now it is possible to use the $PROJECTS_ROOT in particular values. Environment variables will be extracted on the file creation step.

The content of generated some config file in runtime:
Снимок экрана 2022-02-06 в 14 30 57

While it has raw content:

<application>
     <component name="Trusted.Paths.Settings">
         <option name="TRUSTED_PATHS">
             <list>
                 <option value="$PROJECTS_ROOT" />
             </list>
         </option>
     </component>
 </application>

Copy link
Member

@azatsarynnyy azatsarynnyy left a comment

Choose a reason for hiding this comment

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

LGTM
but it would be nice to have separated the code refactoring from the actual patch that fixes the issue (next time 😉)

@vzhukovs vzhukovs merged commit 8bcdaa2 into main Feb 7, 2022
@vzhukovs vzhukovs deleted the che#21110 branch February 7, 2022 09:01
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.

Che-IDEA should trust the sources in PROJECTS_ROOT by default
3 participants