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

Include permission validation step to programmatically cloned repos #2258

Merged
merged 3 commits into from
Feb 16, 2024

Conversation

viniciusdc
Copy link
Contributor

@viniciusdc viniciusdc commented Feb 16, 2024

Reference Issues or PRs

fixes #2218

What does this implement/fix?

Put a x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a feature)
  • Breaking change (fix or feature that would cause existing features not to work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

Testing

  • Did you test the pull request locally?
  • Did you add new tests?

Any other comments?

@viniciusdc
Copy link
Contributor Author

viniciusdc commented Feb 16, 2024

Before the new permission function check: (in this example, we are looking for the pre-initialized examples/test dir)

Captura de tela de 2024-02-16 14 31 50

After this PR changes: (triggered by removing .firstrun)
Captura de tela de 2024-02-16 14 33 48

Ps. I also tested removing the folder, all working (user had the Developer role only to avoid permissions conflict of Admin)

@viniciusdc
Copy link
Contributor Author

viniciusdc commented Feb 16, 2024

The code "could" be heavily simplified for posteriority if we use su -u 1000 or similar for the mkdir and git clone calls. Though this might cause permission errors with the rest of the container, we would need to change the container execution mode as well -- I vaguely remember that I had encountered a blocker while trying to do so with the init container specs, but this can be revisited later.

@viniciusdc viniciusdc added needs: review 👀 This PR is complete and ready for reviewing area: JupyterLab type: release 🏷 Items related to Nebari releases labels Feb 16, 2024
@marcelovilla marcelovilla merged commit d50539c into nebari-dev:develop Feb 16, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: JupyterLab needs: review 👀 This PR is complete and ready for reviewing type: release 🏷 Items related to Nebari releases
Projects
Development

Successfully merging this pull request may close these issues.

[ENH] - Programmatically added example repos cannot be deleted
3 participants