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

Restrict EOS project spaces sharing permissions to admins #2153

Merged
merged 7 commits into from
Oct 13, 2021

Conversation

ishank011
Copy link
Contributor

No description provided.

labkode
labkode previously approved these changes Oct 12, 2021
@labkode
Copy link
Member

labkode commented Oct 12, 2021

@ishank011 we might need to check if the user has the privileges when setting the permissions, but for time being, from the UI this will be hidden, so is good to go for first stage.

@ishank011
Copy link
Contributor Author

@labkode yes, I check that at least one of these has to be set when executing this code

if strings.HasPrefix(w.config.Namespace, eosProjectsNamespace) && (perm.AddGrant || perm.RemoveGrant || perm.UpdateGrant) {

The issue is that EOS never really sets the 'm' permission, so the permission's never set for any directory that isn't owned by the user. As a workaround, I'm adding a check that if 'w' and 'x' are set, we allow resharing as well. Does that sound okay?

@ishank011
Copy link
Contributor Author

The issue is that EOS never really sets the 'm' permission, so the permission's never set for any directory that isn't owned by the user. As a workaround, I'm adding a check that if 'w' and 'x' are set, we allow resharing as well. Does that sound okay?

Instead of this, I inverted the check and I'm setting the sharing permissions to true for the admins group

@ishank011 ishank011 changed the title Restrict EOS project spaces sharing permissions to admins and writers Restrict EOS project spaces sharing permissions to admins Oct 12, 2021
@ishank011 ishank011 marked this pull request as ready for review October 13, 2021 07:07
@labkode labkode self-requested a review October 13, 2021 08:04
@labkode labkode merged commit 19f83bd into cs3org:master Oct 13, 2021
@ishank011 ishank011 deleted the project-sharing branch October 13, 2021 08:16
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.

2 participants