- Issue created by @elc
- πΊπΈUnited States zengenuity
I would suggest we prevent the default transport from being deleted in the user interface. And then we also add a guard to prevent a fatal error if still somehow you have no default transport. I don't think we should automatically switch transports or use another transport if you haven't specifically chosen it, but we can put a more useful error in the logs and just fail to send the message without a fatal error.
- Merge request !9Issue #3412310 by ELC: Prevent default transport from being delete in UI. β (Merged) created by elc
- Status changed to Needs review
over 1 year ago 5:53am 8 January 2024 - π¦πΊAustralia elc
Code regarding handling mail when default transport does not exist has already been changed enough to gracefully handle this happenstance.
This MR goes towards preventing the admin from deleting the default transport.
- π¦πΊAustralia elc
Looks like this one missed out on making into the next release. Updated MR to latest head.
- πΊπΈUnited States zengenuity
Sorry, I didn't include this in the most recent release because I don't think the way you did it was the best approach. I didn't reply yet because I needed more time to confirm that a different way would work.
The better way to do this is to add an access control handler to the Transport entity type. Then, we can specify the logic for when deletes are allowed, and it updates everywhere necessary, such as removing the links and access to the form.
I updated the MR, reverting your commits and adding the access control handler. Can you test my changes to make sure they work for you?
Then, I'll merge this in.
- Status changed to RTBC
about 1 year ago 1:58pm 20 January 2024 - π¦πΊAustralia elc
That is a way better way to handle it. I had a bell going off in my head that what I written was missing something as the entity could still be deleted via code, and access handling was being done in forms. I knew better.
Small adjustment as the delete operation in the list builder is also taken care of by the new access handler.
Anyway, this works well now.
-
zengenuity β
committed cd271994 on 1.0.x authored by
ELC β
Issue #3412310 by ELC, zengenuity: Setting symfony_mailer_lite.settings....
-
zengenuity β
committed cd271994 on 1.0.x authored by
ELC β
- Status changed to Fixed
about 1 year ago 3:29pm 20 January 2024 - πΊπΈUnited States zengenuity
Good catch on the operation link. I've merged the MR. Thanks!
Automatically closed - issue fixed for 2 weeks with no activity.