-
Notifications
You must be signed in to change notification settings - Fork 12
feat: allow inviting Data Access Users to Proposal with email #1615
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
shivoomiess
wants to merge
23
commits into
develop
Choose a base branch
from
SWAP-5408-invite-DAU
base: develop
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
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
11bf743
step 1: add backend models for DAU claim
shivoomiess eebd948
chore: comments + planning wip
shivoomiess e8785bf
add: DB patch for DAU claim
shivoomiess 0a440d4
add: DAU claim datasources
shivoomiess 690a838
add: modify DAU datasources to allow propagate accept invite changes
shivoomiess 3c248cd
add: Dependency injection changes due to DAU claims
shivoomiess eef7581
add: more datasource related functions for invites
shivoomiess 440df87
add: mirror CoProposer invite business logic for DAU
shivoomiess c981fa5
add: events for DAU invites and email template
shivoomiess e9f2506
add: frontend changes for DAU invite
shivoomiess 5bb0f15
add: dataAccessInvites to where Proposal is built
shivoomiess b7732bc
refactor: Show invited for Co-Proposers and DAU inline on Proposal
shivoomiess ce7c095
fix: use correct auth for DAU
shivoomiess f132108
fix: read invite relevant proposal for both co-prop & DAU
shivoomiess e9637ee
fix: changes from review suggestions
shivoomiess ef2df9d
fix: try catch block for DB errors,
shivoomiess 4a8e52d
fix: fetch DA users without institution, remove redundant user details
shivoomiess 709560c
fix: LF to CRLF
shivoomiess 311bab1
feat(backend): auto-accept DAU invite onLogin flow to mirror
shivoomiess 4259b93
feat(frontend): auto-accept DAU invite onLogin flow to mirror Co
shivoomiess 7cce30e
refactor: UI changes for invite list
shivoomiess ce44522
Merge branch 'develop' into SWAP-5408-invite-DAU
shivoomiess e32e88d
Merge branch 'develop' into SWAP-5408-invite-DAU
yoganandaness 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| DO | ||
| $$ | ||
| BEGIN | ||
| IF register_patch('0213_AddDataAccessClaims', 'Shivam K', 'Adding data access user claims', '2026-06-26') THEN | ||
| BEGIN | ||
| CREATE TABLE IF NOT EXISTS data_access_claims ( | ||
| invite_id INT NOT NULL REFERENCES invites(invite_id) ON DELETE CASCADE, | ||
| proposal_pk INT NOT NULL REFERENCES proposals(proposal_pk) ON DELETE CASCADE, | ||
| PRIMARY KEY (invite_id, proposal_pk)); | ||
| END; | ||
| END IF; | ||
| END; | ||
| $$ | ||
| LANGUAGE plpgsql; |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import { DataAccessClaim } from '../models/DataAccessClaim'; | ||
|
|
||
| export interface DataAccessClaimDataSource { | ||
| create(inviteId: number, proposalPk: number): Promise<DataAccessClaim>; | ||
| findByInviteId(inviteId: number): Promise<DataAccessClaim[]>; | ||
| findByProposalPk(proposalPk: number): Promise<DataAccessClaim[]>; | ||
| } |
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
32 changes: 32 additions & 0 deletions
32
apps/backend/src/datasources/mockups/DataAccessClaimDataSource.ts
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,32 @@ | ||
| import { DataAccessClaim } from '../../models/DataAccessClaim'; | ||
| import { DataAccessClaimDataSource } from '../DataAccessClaimDataSource'; | ||
|
|
||
| export class DataAccessClaimDataSourceMock | ||
| implements DataAccessClaimDataSource | ||
| { | ||
| private invites: DataAccessClaim[] = []; | ||
|
|
||
| init() { | ||
| this.invites = [ | ||
| new DataAccessClaim(7, 1), // use IDs unique from coproposal invites | ||
| new DataAccessClaim(8, 2), | ||
| new DataAccessClaim(9, 3), | ||
| ]; | ||
| } | ||
|
|
||
| async findByProposalPk(proposalPk: number): Promise<DataAccessClaim[]> { | ||
| return this.invites.filter((invite) => invite.proposalPk === proposalPk); | ||
| } | ||
|
|
||
| async findByInviteId(inviteId: number): Promise<DataAccessClaim[]> { | ||
| return this.invites.filter((invite) => invite.inviteId === inviteId); | ||
| } | ||
|
|
||
| async create(inviteId: number, proposalPk: number): Promise<DataAccessClaim> { | ||
| const newInvite = new DataAccessClaim(inviteId, proposalPk); | ||
|
|
||
| this.invites.push(newInvite); | ||
|
|
||
| return newInvite; | ||
| } | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.