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
Fix email issues #171
Fix email issues #171
Commits on Sep 30, 2021
-
Enrich and personalise the role request emails.
* Add the entity the role was requested on into the message * Add context and personalise role request emails Co-authored-by: ineilson <ian.neilson@stfc.ac.uk>
-
Factor out preparation and sending of email to a seperate function
This somewhat improves readability.
-
Commits on Oct 1, 2021
-
Remove if statement from NotificationService call
- it's not up to this piece of code to determine if emails should be sent to the used. - that is currently done by the NotificationService itself.
-
-
-
-
-
Read send_email from config file and act appropriately
Remove hardcoded sendmail "test"
-
-
This seems to have originally been factored out as part of 229a0e8 and has been sitting around since then.
-
-
Fix from header and set email address to admin list
Fixes GOCDB#168 (emails "from GOCDB" should come from gocdb-admins@mailman.egi.eu).
-
Handle case where no user has a role over entity
Co-Authored-By: ineilson <ian.neilson@stfc.ac.uk>
-
Use the role requested object to populate email
- this way, if a site role request gets passed up to an NGI level user, they will see the site name in the request (not the NGI name).
-
Always recurse roleRequest when project role needed
- I guess this logic was somewhat there to test /stop recursion if you didn't want to send an email. - The logic of whether to send an email or just print what would have been sent has been factored out already, so we don't need this if statement anymore.
-
-
Use the Factory to access local config
- to support different views of GOCDB being served by the same instance. Co-authored-by: ineilson <ian.neilson@stfc.ac.uk>
-
- the behaviour of recursing this function is repeated further down.
-
Check array is empty rather than null
- `if ( empty( $array_name ) )` is more readable. I think we previously got away with it because `[] == null` returns true, or because the code interchanged empty arrays and `null`.
Commits on Oct 4, 2021
-
Simplify determination of users with GRANT_ROLE
Co-authored-by: ineilson <ian.neilson@stfc.ac.uk>
-
-
-
Update documentation of NotificationService class
Co-authored-by: ineilson <ian.neilson@stfc.ac.uk>
-
Capitalise "GocDB" in lib/Gocdb_Services/NotificationService.php
Co-authored-by: ineilson <ian.neilson@stfc.ac.uk>
-
Add requesting User's surname to emails
- for clarity, as the email could be someone outside their entity. - i.e, a Site role request email going to someone with a role over an NGI.
-
Remove unneeded check for emptiness
- this check is part of the `else` of an `if (count($authorisingUserIds) == 0)` statement. - `array_unique` won't empty `$authorisingUserIds`. - hence, the check here isn't needed. Co-authored-by: ineilson <ian.neilson@stfc.ac.uk>