-
Notifications
You must be signed in to change notification settings - Fork 338
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
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6d49584
✨(back) document as for access CRUD
lunika 39937cb
✨(back) accept for a owner the request to access a document
lunika 6bf48b9
⚡️(frontend) prevent authentication retry on 401 responses
lebaudantoine 085232d
⚡️(frontend) optimize document fetch error handling
lebaudantoine 469581c
✨(frontend) integrate doc access request
AntoLC 530ee8b
✨(backend) send email to admins when user ask for access
AntoLC c274d6f
🐛(env) update yprovider env for local development
AntoLC 1f1c7b0
♻️(frontend) improve separation of concerns in DocShareModal
AntoLC bf0e81e
fixup! ✨(back) document as for access CRUD
AntoLC 4f83a60
✨(frontend) add access request list on doc share modal
AntoLC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# For the CI job test-e2e | ||
BURST_THROTTLE_RATES="200/minute" | ||
COLLABORATION_API_URL=http://y-provider:4444/collaboration/api/ | ||
DJANGO_SERVER_TO_SERVER_API_TOKENS=test-e2e | ||
SUSTAINED_THROTTLE_RATES="200/hour" | ||
Y_PROVIDER_API_BASE_URL=http://y-provider:4444/api/ |
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
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
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
89 changes: 89 additions & 0 deletions
89
src/backend/core/migrations/0022_alter_user_language_documentaskforaccess.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# Generated by Django 5.2.3 on 2025-06-18 10:02 | ||
|
||
import uuid | ||
|
||
import django.db.models.deletion | ||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("core", "0021_activate_unaccent_extension"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="DocumentAskForAccess", | ||
fields=[ | ||
( | ||
"id", | ||
models.UUIDField( | ||
default=uuid.uuid4, | ||
editable=False, | ||
help_text="primary key for the record as UUID", | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="id", | ||
), | ||
), | ||
( | ||
"created_at", | ||
models.DateTimeField( | ||
auto_now_add=True, | ||
help_text="date and time at which a record was created", | ||
verbose_name="created on", | ||
), | ||
), | ||
( | ||
"updated_at", | ||
models.DateTimeField( | ||
auto_now=True, | ||
help_text="date and time at which a record was last updated", | ||
verbose_name="updated on", | ||
), | ||
), | ||
( | ||
"role", | ||
models.CharField( | ||
choices=[ | ||
("reader", "Reader"), | ||
("editor", "Editor"), | ||
("administrator", "Administrator"), | ||
("owner", "Owner"), | ||
], | ||
default="reader", | ||
max_length=20, | ||
), | ||
), | ||
( | ||
"document", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="ask_for_accesses", | ||
to="core.document", | ||
), | ||
), | ||
( | ||
"user", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="ask_for_accesses", | ||
to=settings.AUTH_USER_MODEL, | ||
), | ||
), | ||
], | ||
options={ | ||
"verbose_name": "Document ask for access", | ||
"verbose_name_plural": "Document ask for accesses", | ||
"db_table": "impress_document_ask_for_access", | ||
"constraints": [ | ||
models.UniqueConstraint( | ||
fields=("user", "document"), | ||
name="unique_document_ask_for_access_user", | ||
violation_error_message="This user has already asked for access to this document.", | ||
) | ||
], | ||
}, | ||
), | ||
] |
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.