Skip to content

✨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
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

✨Ask for access #1081

wants to merge 10 commits into from

Conversation

lunika
Copy link
Member

@lunika lunika commented Jun 18, 2025

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

  • ✨(back) document as for access CRUD
  • ✨(back) accept for a owner the request to access a document
  • ✨(frontend) integrate doc access request
  • ✨(backend) send email to admins when user ask for access
  • ♻️(frontend) improve separation of concerns in DocShareModal
  • ✨(frontend) add access request on doc share modal
  • ✨(frontend) button access request on share modal

Demo

Test.request.access.-.Docs.webm


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
Copy link
Collaborator

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

@AntoLC AntoLC force-pushed the feature/ask_for_access branch from aa3a7b6 to 1306d3b Compare June 20, 2025 12:42
@AntoLC AntoLC linked an issue Jun 20, 2025 that may be closed by this pull request
@AntoLC AntoLC force-pushed the feature/ask_for_access branch 4 times, most recently from 2355924 to e7aad69 Compare June 25, 2025 13:23
@AntoLC AntoLC self-assigned this Jun 25, 2025
@AntoLC AntoLC added frontend feature add a new feature labels Jun 25, 2025
@AntoLC AntoLC force-pushed the feature/ask_for_access branch from e7aad69 to 419af81 Compare June 25, 2025 14:06
@AntoLC AntoLC changed the title Ask for access ✨Ask for access Jun 25, 2025
lunika and others added 5 commits June 25, 2025 16:23
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.
@AntoLC AntoLC force-pushed the feature/ask_for_access branch 2 times, most recently from b7fa846 to 4e60102 Compare June 25, 2025 15:03
AntoLC added 3 commits June 25, 2025 17:04
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.
@AntoLC AntoLC requested a review from PanchoutNathan June 25, 2025 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨Forbidden user can request an invitation
2 participants