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

Use SetPermissions instead of UpdatePermissions when setting folder permissions based on top-level ones #1822

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

andrewnester
Copy link
Contributor

Changes

Changed to use SetPermissions() to configure the permissions which remove other permissions on deployment folders.

Tests

Added unit test

bundle/permissions/workspace_root.go Outdated Show resolved Hide resolved
bundle/permissions/workspace_root.go Outdated Show resolved Hide resolved
bundle/permissions/workspace_root.go Show resolved Hide resolved
rootPath += "/"
}

if !strings.HasPrefix(b.Config.Workspace.ArtifactPath, rootPath) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Artifacts in /Volumes/ should get special treatment. But for this PR I'd just make sure that it doesn't fail for Volumes.

For followup considerations: Volumes rely on grants, not permissions. And they lack fine-grained permissions. Plus users often won't have permissions to change grants. But what we may be able to do is check if the grants are correct. Doing so might be the job for a "top-level grants" feature though, rather than the "top-level permissions" feature.

cc @pietern

bundle/permissions/workspace_root.go Outdated Show resolved Hide resolved
bundle/libraries/workspace_path.go Outdated Show resolved Hide resolved
bundle/permissions/workspace_root.go Outdated Show resolved Hide resolved
bundle/permissions/workspace_root.go Show resolved Hide resolved
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.

3 participants