Commit graph

18 commits

Author SHA1 Message Date
Kailash Nadh 3baf18ea45 Add support for wildcards in the email domain blocklist.
Eg: *.example.com, *.mail.example.com etc.

Closes #1275. Closes #1276.
2023-04-09 14:04:02 +05:30
Kailash Nadh 98729f63df Refactor email domain blocklist config field in importer package. 2023-04-09 14:04:02 +05:30
Kailash Nadh c3d04a5490 Refactor models.SubscriberAttribs JSON wrapper to generic name JSON. 2022-10-02 22:53:38 +05:30
Kailash Nadh b5cd9498b1 Refactore all CRUD functions to a new core package.
This is a long pending refactor. All the DB, query, CRUD, and related
logic scattered across HTTP handlers are now moved into a central
`core` package with clean, abstracted methods, decoupling HTTP
handlers from executing direct DB queries and other business logic.

eg: `core.CreateList()`, `core.GetLists()` etc.

- Remove obsolete subscriber methods.
- Move optin hook queries to core.
- Move campaign methods to `core`.
- Move all campaign methods to `core`.
- Move public page functions to `core`.
- Move all template functions to `core`.
- Move media and settings function to `core`.
- Move handler middleware functions to `core`.
- Move all bounce functions to `core`.
- Move all dashboard functions to `core`.
- Fix GetLists() not honouring type
- Fix unwrapped JSON responses.
- Clean up obsolete pre-core util function.
- Replace SQL array null check with cardinality check.
- Fix missing validations in `core` queries.
- Remove superfluous deps on internal `subimporter`.
- Add dashboard functions to `core`.
- Fix broken domain ban check.
- Fix broken subscriber check middleware.
- Remove redundant error handling.
- Remove obsolete functions.
- Remove obsolete structs.
- Remove obsolete queries and DB functions.
- Document the `core` package.
2022-05-03 10:50:29 +05:30
Yatish Mehta 6c903239dd Fix typos 2022-02-13 08:54:39 -08:00
Kailash Nadh 7aee36eab1 Add support for blocklisting e-mail domains.
E-mails in the domain blocklist are disallowed on the admin UI, public
subscription forms, API, and in the bulk importer.

- Add blocklist setting that takes a list of multi-line domains on the
  Settings -> Privacy UI.
- Refactor e-mail validation in subimporter to add blocklist checking
  centrally.
- Add Cypress testr testing domain blocklist behaviour on admin
  and non-admin views.

Closes #336.
2021-09-25 15:39:09 +05:30
Kailash Nadh 868fae6ac2 Refactor subsbscription status option on the import page.
- Refactor subimporter New*() funcs to take opt structs.
- Refactor and simplify Vue code.
- Remove redundant i18n entries and use existing ones.
- Remove redundant subimporter constants and use existing ones.

- Consider 'overwrite' option for subscription status as well.
- Write Cypress integration tests for the new feature.
2021-06-06 17:33:23 +05:30
Russ Smith 7ca08f0a36 Adding a subscription status option to the import.
Ref #168
2021-06-06 17:33:23 +05:30
Kailash Nadh ad0a0e0841 Add preconfirm_subscriptions=true/falsenew subs API.
Sending th optional flag as `trunue` in the POST /api/subscrirs
body will skip sending opt-iconfirmation e-mails to subscribers
and mark list subscriptions in the request a`confirmed`.
2021-04-17 13:34:37 +05:30
Kailash Nadh 966954d8f4 Refactor log view UI into a component. 2020-10-24 11:42:28 +05:30
Vivek R 86c618981f fix: use mail.ParseAddress to validate email instead of custom regex
According to [RFC6532](https://tools.ietf.org/html/rfc6532) unicode characters are supported in email address but the in-built custom regex was only validating ASCII characters.
2020-10-16 01:06:18 +05:30
Kailash Nadh 8c0804ba9f Refactor blacklist to blocklist 2020-08-01 16:45:29 +05:30
Kailash Nadh 61f8fae50d Add 'overwrite?' option to bulk import.
- Fix minor UI inconsitency on import states.
- Minor refactor to importer initialisation.
2020-07-05 21:35:17 +05:30
Kailash Nadh b45a2a0f89 Fix incorrect record count in the importer 2020-07-05 19:39:42 +05:30
Kailash Nadh faf8a7ae63 Add fix for BOM in CSV importers 2020-03-09 19:47:20 +05:30
Kailash Nadh 892d5d2a20 Remove 'govalidator' package dependecy 2020-03-08 13:03:38 +05:30
Kailash Nadh 40ae9cdb31 Minor formatting fixes 2020-03-08 10:54:10 +05:30
Kailash Nadh 9005bb6dad Move internal packages to 'internal' dir 2020-03-08 00:17:54 +05:30