-
Notifications
You must be signed in to change notification settings - Fork 342
✨Ask for access #1081
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
Open
lunika
wants to merge
10
commits into
main
Choose a base branch
from
feature/ask_for_access
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
✨Ask for access #1081
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AntoLC
reviewed
Jun 19, 2025
src/backend/core/api/viewsets.py
Outdated
|
||
roles = set(document.get_roles(self.request.user)) | ||
is_owner_or_admin = bool(roles.intersection(set(models.PRIVILEGED_ROLES))) | ||
# self.is_current_user_owner_or_admin = is_owner_or_admin |
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.
Suggested change
# self.is_current_user_owner_or_admin = is_owner_or_admin |
aa3a7b6
to
1306d3b
Compare
2355924
to
e7aad69
Compare
e7aad69
to
419af81
Compare
We introduce a new model for user wanted to access a document or upgrade their role if they already have access. The viewsets does not implement PUT and PATCH, we don't need it for now.
Add the action accepting a request to access a document. It is possible to override the role from the request and also update an existing DocumentAccess
When a user is redirected on the 403 page, they can now request access to the document.
When a user requests access to a document, an email is sent to the admins and owners of the document.
Improve separation of concerns in the DocShareModal component. The member and invitation list are now in a separate component. It will help us to integrate cleanly the request access list.
b7fa846
to
4e60102
Compare
Add the access request to the document share modal, allowing admin to see and manage access requests directly from the modal interface.
When a document is in public or connected mode, users can now request access to the document.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
A user without access to a document can request the access to it. Also, a user with an existing access can request to change its role.
The backend introduces a new Model responsible to manage this request and to create or update a DocumentAccess
Proposal
Demo
Test.request.access.-.Docs.webm