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

Enhance Activate/Deactivate users #1411

Open
Tracked by #1679
mahalakshme opened this issue Jan 9, 2025 · 7 comments
Open
Tracked by #1679

Enhance Activate/Deactivate users #1411

mahalakshme opened this issue Jan 9, 2025 · 7 comments
Assignees

Comments

@mahalakshme
Copy link
Contributor

mahalakshme commented Jan 9, 2025

Need:

Users to be activated not by default. And instead can be activated when needed.

AC:

  • On 'users and catchments' sample CSV file, add a column called 'Activated' as last column. Add, Allowed values: yes, no. Default: yes in the descriptor row
  • When creation of user done in inactive state via CSV like the above, do not send the user credentials to the user.
  • Add an API to activate users
  • When a user is activated when they are in FORCE_CHANGE_PASSWORD state(when user not yet reset the temporary password), then resend the Avni's temporary password via SMS. This should be the behaviour when activation done via API or UI or CSV(a user can be edited by upload CSV functionality as well)
  • Update readme and API documentation

Technical details:

  • So when activating user - two cognito APIs might need to be called - one for activating and another(AdminCreateUser) for resending user credentials
  • AdminCreateUser cognito API also works like the above expected way only. It resends only when the user is in FORCE_CHANGE_PASSWORD state and when the user is in CONFIRMED state, it returns 400 Bad request with below error message:
{
    "__type": "UnsupportedUserStateException",
    "message": "Resend not possible. glific@rwb24stag status is not FORCE_CHANGE_PASSWORD"
}

Inputs

  • deactivate(suppress) -> activate(send credentials)
  • UI - deactivated? - without sending credentials itself,
  • CSV - Edit
  • 2 cards
  • existing privilege - activate User - Privilege.PrivilegeType.Messaging or 'PrivilegeType.EditUserConfiguration'
  • when activating have an option here, to resend credentials irrespective of User state,
  • enabling instead of disabling
  • APIs, documentation everything should become consistent
    reset password - send credentials? Metabase
    security - enabling user - sending credentials
  • custom privilege?
    Self-serice - anyone, remove admin premission, Avni cloud self-hostable
  • APIs consistent
  • Also have a checkbox in user page named 'Disable'. When a user is created checking this, do not send the user credentials. - anyways can deactivate later - so no need

Ignore: old:

  • On user upload add a checkbox to suppress sending of user credentials(Users might prefer flow of forgot password to prevent the credentials to be in their SMS box for security reasons.)
Image
  • Have a 'RESEND CREDENTIALS' option on each user page. Like the below screen, move the options(other than Edit) to under 'Actions'
Image - When resending the credentials, also send the temporary password to avoid AWS setting some complex password. ----------------- - Expose the above functionality and activating user via API as well
@mahalakshme mahalakshme converted this from a draft issue Jan 9, 2025
@mahalakshme mahalakshme moved this from In Analysis to In Analysis Review in Avni Product Jan 9, 2025
@mahalakshme mahalakshme changed the title Suppress/Resend user credentials Enhance Activate/Deactivate users Jan 28, 2025
@mahalakshme mahalakshme moved this from In Analysis Review to Ready in Avni Product Jan 28, 2025
@1t5j0y
Copy link
Contributor

1t5j0y commented Jan 28, 2025

avniproject/avni-server#840 (comment) - suppress / resend credentials spike

@mahalakshme
Copy link
Contributor Author

mahalakshme commented Jan 28, 2025

@1t5j0y yes it is via setting RESEND in MessageAction we can resend the credentials when activating the user. will update the technical details for more clarity

@petmongrels petmongrels moved this from Ready to In Progress in Avni Product Jan 29, 2025
@petmongrels petmongrels self-assigned this Jan 29, 2025
@petmongrels
Copy link
Contributor

petmongrels commented Jan 29, 2025

Notes

  • API user should have "Edit user configuration"
  • handle error when the permanent password user is enabled

petmongrels added a commit to avniproject/avni-server that referenced this issue Jan 29, 2025
…er active status. use cognito api to disable the user on creation if active field is false. api for activating the user.
petmongrels added a commit to avniproject/avni-server that referenced this issue Jan 29, 2025
…super admin for testing. activate user working.
@mahalakshme
Copy link
Contributor Author

@petmongrels oh yeah I forgot to add the permissions requirement, will add it

petmongrels added a commit to avniproject/avni-server that referenced this issue Jan 30, 2025
…ne method per cognito operation. added enable user endpoint to external api. handler do not send sms and force send sms.
petmongrels added a commit to avniproject/avni-server that referenced this issue Jan 30, 2025
…to standard contract fields. api doc change.
petmongrels added a commit to avniproject/avni-server that referenced this issue Jan 30, 2025
…er active status. use cognito api to disable the user on creation if active field is false. api for activating the user.
petmongrels added a commit to avniproject/avni-server that referenced this issue Jan 30, 2025
…super admin for testing. activate user working.
petmongrels added a commit to avniproject/avni-server that referenced this issue Jan 30, 2025
…ne method per cognito operation. added enable user endpoint to external api. handler do not send sms and force send sms.
petmongrels added a commit to avniproject/avni-server that referenced this issue Jan 30, 2025
…to standard contract fields. api doc change.
@petmongrels petmongrels moved this from In Progress to Code Review Ready in Avni Product Jan 30, 2025
@1t5j0y 1t5j0y moved this from Code Review Ready to In Code Review in Avni Product Jan 31, 2025
@1t5j0y 1t5j0y moved this from In Code Review to QA Ready in Avni Product Jan 31, 2025
petmongrels added a commit to avniproject/avni-server that referenced this issue Feb 3, 2025
@AchalaBelokar AchalaBelokar moved this from QA Ready to In QA in Avni Product Feb 3, 2025
petmongrels added a commit to avniproject/avni-server that referenced this issue Feb 4, 2025
petmongrels added a commit to avniproject/avni-server that referenced this issue Feb 4, 2025
@AchalaBelokar
Copy link

  • I Uploaded this csv file on staging in org apfodisha. I uploaded as active user no. I didn’t get any message is expected but on user list it is showing the active user.
Image

user_create _apfodisha.csv

@AchalaBelokar AchalaBelokar moved this from In QA to QA Failed in Avni Product Feb 4, 2025
@mahalakshme
Copy link
Contributor Author

@petmongrels looks like the above case got missed in AC. When a user is inactive, in the list of users page it should not show as 'Active'

@AchalaBelokar u can continue testing the other cases in the mean time.

@petmongrels petmongrels moved this from QA Failed to In Progress in Avni Product Feb 5, 2025
petmongrels added a commit to avniproject/avni-server that referenced this issue Feb 6, 2025
@petmongrels petmongrels moved this from In Progress to QA Ready in Avni Product Feb 6, 2025
petmongrels added a commit to avniproject/avni-server that referenced this issue Feb 6, 2025
petmongrels added a commit to avniproject/avni-server that referenced this issue Feb 6, 2025
@AchalaBelokar AchalaBelokar moved this from QA Ready to In QA in Avni Product Feb 6, 2025
petmongrels added a commit to avniproject/avni-server that referenced this issue Feb 6, 2025
petmongrels added a commit to avniproject/avni-server that referenced this issue Feb 6, 2025
petmongrels added a commit to avniproject/avni-server that referenced this issue Feb 6, 2025
petmongrels added a commit to avniproject/avni-server that referenced this issue Feb 7, 2025
@AchalaBelokar AchalaBelokar moved this from In QA to Done in Avni Product Feb 7, 2025
1t5j0y added a commit to avniproject/avni-server that referenced this issue Feb 13, 2025
@mahalakshme mahalakshme moved this from Done to QA Failed in Avni Product Feb 19, 2025
@mahalakshme
Copy link
Contributor Author

@petmongrels User created in deactivated state by default when no value is entered. This is causing confusion since users are not used to enter value for this column.

@mahalakshme mahalakshme reopened this Feb 19, 2025
@github-project-automation github-project-automation bot moved this from QA Failed to Triaged in Avni Product Feb 19, 2025
@mahalakshme mahalakshme moved this from Triaged to QA Failed in Avni Product Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: QA Failed
Development

No branches or pull requests

6 participants