There is a minor change to add a flag to indicate "contribute to funding flow" in portfolio level.
The program change is committed to dev branch accidentally.
This minor change will be reviewed when we create a PR for live env deployment. That PR will include all delta changes between dev branch and main branch.
This PR is submitted to add existing user to institution directly.
This PR contains below changes in backend:
For email address not existed in existing users, use original workflow to send email invitation.
For email address that existed in existing users, do below if user not belong to the institution
2.1 Send email confirmation instead of email invitation, it is not required to register again
2.2 Add role_invites record for reference purpose
2.3 Add organisation_members record, user will be added to institution immediately
Potential Change:
There are three possible roles for institutional user:
Institutional Admin
Institutional Assessor
Institutional Member
The user role is defined in user account level now. (i.e. model_has_roles table)
This is not defined in institution member level. (i.e. organisation_members)
In other words, one login account can have one role only.
For example:
New user A has been invited to join institution Stats4SD as Institutional Assesser
New user A registered login account, system assigned role Institutional Assesser to user A
Existing user A has been invited to join institution ICRAF as another role, e.g. Institutional Member
Existing user A will be added to institution ICRAF directly, but the role is Institutional Assesser instead of Institutional Member
In Invite members page, when we fill in an email address for an existing user, the selected role will have no effect.
This is not ideal, but I am not sure whether this PR is now good enough to fulfill user's need at this moment.
If we need to support different role in different institution, more refinement work and testings are required. E.g.
Move role from table model_has_roles to organisation_members
Play around with Backpack permission manager, probably it may not be very straight forward to do our required change
Prepare data migration for existing users in live env
I would recommend:
Check whether institution level role is required or not
NOTE
There is a minor change to add a flag to indicate "contribute to funding flow" in portfolio level. The program change is committed to dev branch accidentally. This minor change will be reviewed when we create a PR for live env deployment. That PR will include all delta changes between dev branch and main branch.
This PR is submitted to add existing user to institution directly.
This PR contains below changes in backend:
Potential Change:
There are three possible roles for institutional user:
The user role is defined in user account level now. (i.e. model_has_roles table) This is not defined in institution member level. (i.e. organisation_members)
In other words, one login account can have one role only. For example:
In Invite members page, when we fill in an email address for an existing user, the selected role will have no effect. This is not ideal, but I am not sure whether this PR is now good enough to fulfill user's need at this moment.
If we need to support different role in different institution, more refinement work and testings are required. E.g.
I would recommend: