You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm following the official document to create a policy (rule) in ACP. The policy was successfully created, and seems to be interpreted by Solid (CSS). However, if I look into the .acr document, things are not as expected.
There are three strange behaviours:
Unnamed nodes from existing policy are unwrapped and given a blank node name (a very long one rather than a compact one);
It creates a new node (#defaultAccessControl) for acp:AccessControl instead of using an existing one (because this line refers to a function which should reuse an existing acp:AccessControl);
The created new node does not have a acp:AccessControl for its type.
To Reproduce
Create a .acr with some policy (e.g. the MRE below)
Follow the steps in the official document to create a new access control policy for it
I understand your concerns, but I think it is correct that a given Access Control Resource may have several Access Controls, and having the acp:AccessControl type is implicit. For instance, it is omitted in https://solidproject.org/TR/acp#example-access-control.
Is it accurate to say that the graph isn't isomorphic to what you would prefer, but it is semantically equivalent and results in access policies being applied accurately?
Yes, you are right, it is semantically equivalent, and the policies are applied accurately.
I understand that they may have implicit types, and actually would be more inclined to not requiring an explicit type (because it should be inferrable in principle). Although, 1) the solid-client library actually assumes explicit typing and relies on that heavily for ACP; 2) for the manipulation, I would believe it is a better idea to explicitly type every new node the library creates.
Apart from that, the main issue I see is the (seemingly) inconsistency between the code and the actual behaviour, particularly the item 2 and this line of the library (which is called by acp_ess_2.setResourcePolicy()). The code seems to suggest that no new acp:AccessControl node should be created, while in reality it creates a new node (without explicitly giving it a type acp:AccessControl), and named it #defaultAccessControl.
The behaviour seems to be more aligned with this addPolicyUrl() function in policy/addPolicyUrl.ts, rather than the imported control.ts#addPolicyUrl().
So, again, this routes back to my question (in the other recent issues) on the relation between these same-name similar-purpose different-implementation functions under different files / directories, and the possibility of them messing up the code.
Search terms you've used
Bug description
I'm following the official document to create a policy (rule) in ACP. The policy was successfully created, and seems to be interpreted by Solid (CSS). However, if I look into the .acr document, things are not as expected.
There are three strange behaviours:
#defaultAccessControl
) foracp:AccessControl
instead of using an existing one (because this line refers to a function which should reuse an existingacp:AccessControl
);a acp:AccessControl
for its type.To Reproduce
Minimal reproduction
See this gist for the example
.acr
file: https://gist.github.com/renyuneyun/834eb5ee542e06a2cc3ee1a57712ca3f.To reproduce, remove
, <#defaultAccessControl>
at line 6 and remove line 25-31, and put it to the .acr file.Expected result
acp:AccessControl
node being used;acp:AccessControl
as its type.Actual result
See comment under the gist for the actual
.acr
file after the operation.Environment
Additional information
The text was updated successfully, but these errors were encountered: