-
Notifications
You must be signed in to change notification settings - Fork 28
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
Conversation
4e942cd
to
690aa0f
Compare
b4d9057
to
e93cd6d
Compare
I've added a few commits that fix some bugs I found while trying to put together a sanity check that this was working as I would expect. |
I've had my hands all over this now, so I'd appreciate a review from @tofu-rocketry or @ineilson. For my own future reference:
|
Looking at Travis - I should merge #238 first. |
f64884e
to
3aabc41
Compare
As a note to Future Greg, one of these commits reverts another one of these commits - that at least can be squashed.
|
As a further note to Future Greg, |
* Add the entity the role was requested on into the message * Add context and personalise role request emails Co-authored-by: ineilson <[email protected]>
This somewhat improves readability.
I've squashed some of my more "bug-fixy" commits into other commits but decided to leave the majority to not conflate moving code about and changing behaviour.
|
This seems to have originally been factored out as part of 229a0e8 and has been sitting around since then.
Fixes GOCDB#168 (emails "from GOCDB" should come from [email protected]).
Co-Authored-By: ineilson <[email protected]>
- 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).
- 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.
- to support different views of GOCDB being served by the same instance. Co-authored-by: ineilson <[email protected]>
- the behaviour of recursing this function is repeated further down.
- `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`.
@ineilson could I get your seal of approval? 🦭 |
Co-authored-by: ineilson <[email protected]>
- for later reuse.
Co-authored-by: ineilson <[email protected]>
Co-authored-by: ineilson <[email protected]>
- 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.
- 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 <[email protected]>
Suggestions applied, @ineilson could I get a fresh seal of approval? |
- as per GOCDB#171
- as per GOCDB#171
Depends on #238
Fixes #64, fixes #163 and fixes #168.