-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feat: add access request & granting #37
base: development
Are you sure you want to change the base?
Conversation
ba27728
to
cda5a54
Compare
cddcf64
to
50e22f8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not looked at the code, but intended to test the functionality.
Doing this, I ran into a first issue: it is unclear to me as a user how to request access.
What is expected in the field WebID: the WebID to whom I want to sent an access request?
What is expected in the field next to it?
Where do I add the path of the file to which I request access?
See screenshot: I logged in as electronics_user1. The button 'request access' remains disabled and the field above it as well.
I've added some extra info pop-ups to the inputs and made the tree input reactive based on the state of the selected pods & their contents |
2e3736c
to
0467263
Compare
Thanks, this clarifies a lot. |
Daarnaast ben ik ook nog bezig met venster toe te voegen waarin je kan selecteren welke permissies je precies wilt aanvragen. Momenteel is dat nog gehardcode op read permissies |
First, I want to say I like how it works. Currently, I have not checked the code yet as I have some high level questions:
Another reason why I did not look into the code is that it seems to work as expected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Tested and approved.
But I think it's better for the last two to be converted into seperate issues |
…etting permissions
… non-requestable resources
Makes that the new files are directly available & have their corresponding permissions
ca68cca
to
352538a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I focused on the interfaces and noticed that not all methods have documentation. It seems that IStore
, IController
and IAccessRequest
are crucial, yet only some methods in these interfaces are detailed. As a result, I am unsure what these methods specifically do. I've added remarks for the ones that are somewhat confusing to me. Could you add documentation describing their functions?
Another high-level aspect I do not understand is why the implementation of AccessRequest
requires an IController
and why the IController
interface itself has a method AccessRequest(): IAccessRequest;
.
Could you elaborate how that works?
Finally, there is the granting control
on access requests.
We've added a safeguard (a warning clickbox) when you try to give access to other users when granting control access. However, when doing it via access requests, no message pop ups.
Could you add the same safeguard if the requested access includes control permission?
Other than that, it is ready to be merged.
Furthermore, I agree with your last message to make issues for the requested features and I will make those once this PR is merged.
@@ -1,5 +1,10 @@ | |||
import { url } from "loama-common"; | |||
|
|||
export interface Resources { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is a Resource? Can you add some comments such that we know what is meant?
permissionsPerSubject: SubjectPermissions<T>[] | ||
} | ||
|
||
export interface ResourceAccessRequestNode { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I presume this is a recursive tree structure for a pod that checks where you can have access. Is that correct?
If so, can you document this at this interface?
I furthermore presume the children Record key is also an url, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a comment to explain what this data structure should hold.
The first part of your comment is correct. But the children keys are path parts and not full urls to make tree visualizations easier
controller/src/types/modules.ts
Outdated
allowAccessRequest(resourceUrl: string): Promise<void> | ||
disallowAccessRequest(resourceUrl: string): Promise<void> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do this methods send HTTP requests to the acl files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it sets if the resource is visible for access request
|
||
loadAccessRequests(): Promise<AccessRequestMessage[]>; | ||
loadRequestResponses(): Promise<RequestResponseMessage[]>; | ||
removeRequest(messageUrl: string): Promise<void>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the difference between removeRequest(messageUrl: string): Promise<void>
and disallowAccessRequest(resourceUrl: string): Promise<void>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added explanation for both functions to the interfaces.
The first should remove the message from the inbox, the latter disable the resource from being requestable for another person
a6c22a5
to
308361b
Compare
So, I've added explanation to most of the new functions in the interfaces. |
Adds access request & inbox tabs to handle:
How to test
I've used firefox built-in container tabs to prevent the need of 2 dev server running in the background.
closes #9