Skip to content

Conversation

@megoth
Copy link
Contributor

@megoth megoth commented Aug 19, 2019

This checks whether pathname indicates that the target is root, or whether the root ACL itself states that the target is root.

Going to create a PR for NSS as well that adds <.> a sp:Storage. as default for all new root ACLs.

This checks whether pathname indicates that the target is root, or whether the root ACL itself states that the target is root.
@megoth megoth requested review from Vinnl and timbl August 19, 2019 17:48
@megoth
Copy link
Contributor Author

megoth commented Aug 19, 2019

@bourgeoa
Copy link
Contributor

it solves /(root) but not avoid /public to delete is /public/.acl with the consequence of being unable to rebuild/edit /public/.acl in the future (see also issue #99)

@megoth
Copy link
Contributor Author

megoth commented Aug 23, 2019

@bourgeoa thanks for finding this. So this seems to be a bit more complex issue than we initially thought - I will do a bit more research to see how this can be mitigated. I'll update this thread once I know more.

Copy link
Contributor

@timbl timbl left a comment

Choose a reason for hiding this comment

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

I think this should be a clean function of targetDoc. Bringing in window.location assumes that the targetDoc os also is the window location, which is non-optimal. Suggest something like targetDoc.uri = targeDoc.site().uri or targetDoc.equals(taregetDoc.site())

window.location && window.location.pathname === '/'

@timbl timbl closed this Aug 23, 2019
@timbl timbl reopened this Aug 23, 2019
@megoth megoth self-assigned this Aug 26, 2019
@megoth
Copy link
Contributor Author

megoth commented Aug 27, 2019

@bourgeoa We don't need to protect the folders under root, but https://github.com/solid/solid-ui/issues/99 shows us that we have a bug, namely that we currently cannot create new .acl files for folders directly under root.

I will for now only protect root ACL, and work on https://github.com/solid/solid-ui/issues/99 to find a solution that allows for creating new .acl files for folders directly under root.

Using suggested solution from Tim.

Also made code a bit more verbose, to make it easier to fix hacks when we have a standard way of handling this.
@megoth
Copy link
Contributor Author

megoth commented Aug 27, 2019

@timbl I've added the changes that you proposed.

Please review again, and merge if everything looks good.

Copy link
Contributor

@timbl timbl left a comment

Choose a reason for hiding this comment

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

Looks OK to me thoughI have not tested it

@megoth megoth merged commit 3d05c8e into master Aug 28, 2019
@megoth megoth deleted the prevent-root-acl-delete branch August 28, 2019 17:44
@brownhoward brownhoward added this to the Data Browser Release 2 milestone Oct 28, 2019
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.

6 participants