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

Pending approvals: possibility to send a message #6335

Closed
marc-farre opened this issue May 18, 2023 · 18 comments
Closed

Pending approvals: possibility to send a message #6335

marc-farre opened this issue May 18, 2023 · 18 comments

Comments

@marc-farre
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

When a new user creates an account and an admin must approve or refuse it, sometimes the admin needs to ask him complementary information.

Describe the solution you'd like

Add the possibility to send him a message:

image

And in /admin/authentication add a rich text field to have a message model (similar to the approval and refuse message template).

Describe alternatives you've considered

Instead of adding a 4th button, replace with a drop down list.

@luke-
Copy link
Contributor

luke- commented May 18, 2023

Wouldn't it be sufficient if the admin clicks on the email address?

@ArchBlood
Copy link
Contributor

Wouldn't it be sufficient if the admin clicks on the email address?

I'm not sure about this, as an admin wouldn't know that this action would be possible without prior knowledge of HumHub, maybe if a tooltip were also implemented suggesting that the action is available then this would be possible. 🤔

@luke-
Copy link
Contributor

luke- commented May 19, 2023

Hmm, the "Send message" feature would have the same problems as an e-mail:

  • Other admins can't see that a message has been sent
  • The reply to the message would be sent by email anyway

@marc-farre
Copy link
Collaborator Author

The advantage of this idea is to have a ready-made email template to ask them for additional information.

It also allows you to use the system email rather than a personal email. But of curse, yes, you need to receive replied emails. This is a limitation, but can work.

We could imagine, in the future, saving the information that an email has been sent in order to show it next to the button (label or other), which would be practical if we manage a lot of registrations or if there are several admins.

But I agree this feature idea is not perfect, so if you think it adds more complexity than advantages, lets forget it!

@luke-
Copy link
Contributor

luke- commented May 19, 2023

@funkycram Hmm, I'm really unsure about it.

What happens after, when the Admin have sent a message to the user? The user himself has no possibility to update his registration details.

@marc-farre
Copy link
Collaborator Author

marc-farre commented May 19, 2023

The idea is that the user will answer the questions by replying to the email.
The admin should receive the reply email (but on some mail configuration he might not receive it...).
If he's satisfied by his answer, he approves the account. If not, he declines it.
But I admit it's not a perfect solution, so let's forget it if it's not a good idea.

@luke-
Copy link
Contributor

luke- commented May 20, 2023

@funkycram Ok I got it. This feature should be small from the code base, so if you like, feel free to create a PR for it. Thanks :-)

@marc-farre
Copy link
Collaborator Author

marc-farre commented May 31, 2023

@luke- #6365

image

image

image

image

@ArchBlood
Copy link
Contributor

@luke- #6365

image

image

image

image

Could you provide a mobile view of the buttons with the default theme?

@marc-farre
Copy link
Collaborator Author

@ArchBlood I only added a button, so the view is the same as before on mobile. It mainly depends on the number of profile fields you add to the table.
Example with 500px width (under the result is bad):
image

@marc-farre
Copy link
Collaborator Author

marc-farre commented May 31, 2023

@luke- 4 tests fails:

  • ApproveUserFormTest.php:testSendMessageIsSentInUserLanguage (here): we first need german translation for it to work
  • The 3 others: I don't understand why they don't work. I've created them on the same model as the approve and decline ones. Perhaps we don't need so many tests only for sending an email?

@luke-
Copy link
Contributor

luke- commented May 31, 2023

@funkycram Thanks for the PR.

@yurabakhtin Can you maybe help?

@yurabakhtin
Copy link
Contributor

Can you maybe help?

I think the error is here #6365 (review)

@marc-farre
Copy link
Collaborator Author

@luke- I think PR #6365 is now okay: checks passed (although I don't know why as German translations are still missing) and Semir message suggestions are integrated.

@luke-
Copy link
Contributor

luke- commented Aug 16, 2023

@funkycram Thank you for your patience.

@luke- luke- closed this as completed Aug 16, 2023
@marc-farre
Copy link
Collaborator Author

@luke- would you accept an additional commit to #6365 allowing to send a bulk message to several pending approval users at the same time, adding a button at the bottom, before "Approval all selected"?

image

Thanks!

@marc-farre marc-farre reopened this Oct 2, 2023
@luke-
Copy link
Contributor

luke- commented Oct 2, 2023

@marc-farre Yes! :-)

@marc-farre
Copy link
Collaborator Author

@luke- Done in commit 6d998f1

luke- added a commit that referenced this issue Apr 4, 2024
* Enh #6335: Pending approvals: possibility to send a message

* Enh #6335: Pending approvals: possibility to send a message

* Enh #6335: Pending approvals: possibility to send a message

* Added nb msg sent

* Added nb msg sent

* fixed tests

* fix test (removal of assertNotNull)

* merged updated changelog

* merged updated changelog

* merged updated changelog

* merged updated changelog

* fix testNonGroupManagerCannotSendMessageUnapprovedUser

* merged updated changelog

* Semir rewording

* allowing to send a bulk message to several pending approval users at the same time

* Fixed test translations

* Fixed test translations

* Fix test translations

---------

Co-authored-by: Yuriy Bakhtin <yurabakhtin@users.noreply.github.com>
Co-authored-by: Lucas Bartholemy <luke-@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants