Skip to content
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

4032 - Split User Role / Invitation #4053

Merged
merged 53 commits into from
Dec 19, 2024

Conversation

sorja
Copy link
Contributor

@sorja sorja commented Oct 23, 2024

Resolves #4032
Resolves #4156

  • Test

Finished tasks:

  • UserRole and UserInvitation : check if assessmentUuid is required
  • Check useMessageBoardUsers.tsx
  • Check repository\public\userRole\update.ts (admin role management)
  • Check _cloneUserRoles.ts
  • Fix admin count

Note to self:
_cloneUserRoles.ts:
// Only clone roles, not invitations
// Update: cycle uuid and created_at
// created_at must be equal to cycle dateCreated: cycleTarget.props.dateCreated

* 4032 - UserInvitation type

* 4032 - Update getCreatePublicSchemaDDL

* 4032 - Migration step

* 4032 - update DDL

* 4032 - update migration

* 4032 - restore meta/userRole

* 4032 -  add created at

* disable testing/building

* enable tests

* l_ur.accepted_at as created_at

* fix invitation_uuid

* 4032 -  migrate valid roles and populate created at

* 4032 -  default time stamp from cycle for roles
@sorja sorja linked an issue Oct 23, 2024 that may be closed by this pull request
25 tasks
@sorja sorja changed the title 4032 - Split database table and data migration (#4036) 4032 - Split User Role / Invitation Oct 23, 2024
sorja and others added 27 commits October 24, 2024 10:11
* 4032 - meta: userRole, userRoles

* 4032 - test/integration: userInvite update

* 4032 - getCreatePublicSchemaDDL: update users_invitation ddl

* 4032 - userInvitation: isInvitationExpired -> isExpired

* 4032 - userInvitation: require assessmentUuid, userRole: optional cycleUuid

* 4032 - userInvitation: require countryIso

* 4032 - compare role.createdAt with Dates

* 4032 - UserInvitation: invitedByUserUuid required

* 4032 - deepscan

* 4032 - userRoles: add unit test for getLastRole

* 4032 - update hasRoleInAssessment
* 4032 - AssessmentController: get one with UUID

* 4032 - AssessmentController: get one with UUID

* 4032 - UserRepository: uuid on roles

* 4032 - UserInvitationRepository: create

* 4032 - MailService: update user invite

* 4032 - UserController: invite

* 4032 - AssessmentController: get one with UUID

* 4032 - Remove user invitation related code from getOne user

* 4032 - AssessmentRepository: use type checking for props
* 4032 - UserController: update findByInvitation

* 4032 - auth/strategy: Update with new findByInvitation

* 4032 - UserInvitation: Accept

* 4032 - Update UserRole create

* 4032 - Update sendInvitationEmail
* 4032 - Remove unused UserRoleRepository functions

add todo for update/pendingInvitations

* 4032 - Introduce UserInvitationRepository remove

* 4032 - Remove Invitation API and Controller

* 4032 - Get Invitation API

* 4032 - UserInvitation Repository: renew, getOne, getMany, getCount

* 4032 - User Repository: count, getAdmins, getContacts, getMany, readCountryUsersByRole
* 4032 - store/userManagement: use singular endpoint for updating user

* 4032 - backend: get many (pending) invitations
* 4032 - Add UserInvitations with Invite button

* 4032 - Move collaborators from FraHome to CountryHome

* 4032 - Introduce UserList element
* 4032 - unique class name

* 4032 - deprecate old UserList

* 4032 - Update StatusConfirm: add simple user list

* 4032 - Update StatusConfirm: add simple user list

* Use props extraction

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* 4032 - Country User Summary

* 4032 - rename CountryUserSummaryRepository.createOrReplaceView to getCreateOrReplaceViewCountryUserSummary

* 4032 - remove optional param schemaName

* 4032 - CountryUserSummary view query: remove user_data CTE, rename user_uuid to uuid, include fullname

* 4032 - CountryUserSummary view query: let role and invitation be undefined
* 4032 - Country User Summary type

* 4032 - Country User Summary update view

- Include admins
- Include id
- Fix typo in full name column

* 4032 - users/getMany: Initial commit

* 4032 - Separate type UserQueryParams

* 4032 - UserRepository: Use named params for getMany

* 4032 - UserRepository: Use named params for getMany

* 4032 - CountryUserSummary: clean up query

* 4032 - Add indexes for users_invitation, users_role

* 4032 - Rehaul country_user_summary

* 4032 - Users/getMany: fix role filtering for invitations

* 4032 - country_user_summary: Fix admins role column

* 4032 - repository/user: update count
* 4032 - Manage Collaborators -> Collaborators

* 4032 - Move and update Admin/UserManagement to AdminCollaborators

* 4032 - useRoutes: use AdminCollaborators

* 4032 - RoleField: Support invitations

* 4032 - deepscan
* 4032 - Include Lang column in country_user_summary

* 4032 - Deprecation notice/todo

* 4032 - meta/CountryUserSummaries: getCountryRoleAndInvitation, isInvitation

* 4032 - UserList: Move invite to UserList and remove UserInvitations component

* 4032 - ActionsContainer: Remove unused component

* 4032 - Users: update (invitation) Info column

* 4032 - users/getMany: include lang

* 4032 - Users/Actions: Update hooks

* 4032 - Users/Actions: Update CopyLink

* 4032 - Users/Actions: Update Edit [user]

* 4032 - Users/Actions: Update Remove

* 4032 - Users/Actions: Update Resend

* 4032 - Users: Update Actions

* 4032 - Update Users
* 4032 - Fix Recipients in country status change

* 4032 - Fix MessageBoard

* 4032 - store/userManagement: Update types and deprecate
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
@sorja sorja requested review from minotogna and yaguzmang and removed request for yaguzmang November 28, 2024 08:39
@sorja sorja force-pushed the 4032-split-user-role-invitation branch from 9f74fdb to 44e404a Compare November 28, 2024 09:27
@mergify mergify bot mentioned this pull request Nov 28, 2024
sorja and others added 16 commits November 28, 2024 10:30
* 4032 - delete unused file

* 4032 - remove unused parameter

* 4032 - fix invitation count
* 4032 - Reviewer cannot access invitation actions

* 4032 - introduce hook: useCanEditUserActivities

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* 4032 - Remove Users component

* 4032 - refactor ui

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* 4032 - refactor Country Home header

* 4032 - fix message count

* 4032 - improve ui
* 4032 - Dashboard UI

* 4032 - update users sort fn

* 4032 - update user role label

* 4032 - refactor table paginated sort

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* 4032 - Fix inconsistencies in Admin/Collaborators

* 4032 - Admin collaborators: Filter by disabled

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* 4032 - Refactor users.getMany filters logic

* 4032 - Fix users results

* 4032 - Fix ts-ignore

* 4032 - Fix deep scan
* 4032 - useUserCountryISOs: hide atlantis countries in published views

* 4032 - remove isAtlantisAllowed

* 4156 - update .env.template

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
minotogna and others added 3 commits December 16, 2024 12:41
* 4032 - Ui Collaborators grouped

* 4032 - Collaborators Grouped UI
* 4032 - Collaborators/User edit final fixes

* 4032 - add user i18n

* 4032 - update sections collaborator i18n

* 4032 - update roles logic in /UserCountryRoleSelector/hooks/useOptions

* 4032 - fix panEuropean description labels

* 4032 - fix clone cycle

* 4032 - update skeleton duration

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
@minotogna minotogna marked this pull request as ready for review December 19, 2024 07:10
@mergify mergify bot merged commit 8b9298e into development Dec 19, 2024
5 checks passed
@mergify mergify bot deleted the 4032-split-user-role-invitation branch December 19, 2024 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor Atlantis countries usage Split User Role / Invitation
2 participants