Commit Graph

149 Commits

Author SHA1 Message Date
Marie PUPO JEAMMET
e01b422c13 (mailboxes) check imported mailboxes don't clash with existing alias
check that dimail imported mailboxes don't use the same username
as existing aliases.
2025-12-05 15:03:17 +00:00
Marie PUPO JEAMMET
040f949e5e (aliases) import existing aliases from dimail
import existing aliases from dimail, making sure usernames don't clash with
existing mailboxes. Convenient when people fall out of sync
with dimail or for domains partially operated outside people.
2025-12-05 15:03:17 +00:00
Marie PUPO JEAMMET
3a2b5a6428 🛂(permissions) return 404 to users with no domain access
users having no domain access should be forbidden to know the domain is
managed in people. To this effect, 403_FORBIDDEN responses have been
replaced by 404_NOT_FOUND.
2025-11-21 17:04:20 +00:00
Marie PUPO JEAMMET
15337a2226 (aliases) warn that domain is out of sync when unexpected 404
deleting an alias should trigger a request to dimail. if dimail's
response if a 404, it means people and dimail are out of sync with
each other. log error and warn user
2025-11-20 11:24:59 +00:00
Marie PUPO JEAMMET
0f7e312eb6 (mailboxes) cannot create mailbox with same local part as alias
should not be able to create a mailbox having the same local part as an alias
2025-11-20 11:24:59 +00:00
Marie PUPO JEAMMET
23561cd0e0 🔥(sops) remove obsolete sops file
remove obsolete sops file
2025-11-20 11:24:59 +00:00
Marie PUPO JEAMMET
53d0336755 (aliases) delete aliases
add feature to delete aliases
2025-11-20 11:24:59 +00:00
Marie PUPO JEAMMET
b79e12b4be (aliases) list aliases
Can GET a list of all aliases of a domain
2025-11-20 11:24:59 +00:00
Marie PUPO JEAMMET
c237bb4b10 (aliases) create aliases
allow domain managers to create aliases on their domain
2025-11-20 11:24:59 +00:00
Marie PUPO JEAMMET
71a7bf688f 🐛(mailbox) fix case-sensitive duplicate display names
uniqueness on first name + last name was case-sensitive, which allowed
duplicates
2025-10-22 08:22:48 +00:00
Marie PUPO JEAMMET
4262f469d6 ♻️(tests) refacto dimail tests with fixtures
test_api_mailboxes_create exceeded 1000 lines. By using fixtures, we can
at least factorize dimail response when token is ok or mailbox_data sent
to our API when creating a mailbox.
2025-10-14 10:00:28 +00:00
Marie PUPO JEAMMET
b24cb23a83 (models) impose uniqueness on display name, to match ox's constraint
OpenXchange's primary key is display name (= first name + last name).
It must be unique in the domain's context. We don't have context info
but we can impose uniqueness by domain.
2025-10-14 10:00:28 +00:00
Marie PUPO JEAMMET
608f8c6988 🐛(dimail) grab duplicate displayname error
OpenXchange's primary key is display name (= first name + last name).
In absence of clear error message from dimail (yet), we catch errors 500 and
check if they're not due to the display name already existing in the context
2025-10-14 10:00:28 +00:00
Laurent Bossavit
230ff21220 (mailbox) synchronize password of newly created mailbox with Dimail's
When using La Régie as Identity Provider this allows signing in.
2025-09-23 17:40:08 +02:00
Marie PUPO JEAMMET
1bfad507ef (api) retrieve mailboxes
add feature to retrieve mailboxes when having the right access
2025-09-02 13:45:26 +02:00
Marie PUPO JEAMMET
72e73bff45 (api) give update rights to domain viewer on own mailbox
Introduces the notion of self in permissions
allowing a domain viewer to update their own mailbox.
2025-09-02 13:45:26 +02:00
Marie PUPO JEAMMET
e45cf8dd8b (api) update mailboxes
Allow update of mailboxes. Secondary email, first and last names can be updated
but not domain or local_part.
2025-09-02 13:45:26 +02:00
Marie PUPO JEAMMET
4f97685204 🐛(admin) fix mailbox import from dimail
importing mailboxes from dimail was broken due to a change of format in dimail's
response.
2025-08-29 11:46:33 +02:00
Quentin BEY
f7a97e11e8 🎨(ruff) fix linter error after ruff update
Fix the `make lint` errors after dependencies update.
2025-08-26 11:36:05 +02:00
Marie PUPO JEAMMET
ebd3f467c4 🐛(admin) fix read_only preventing mailbox creation in admin
removed read_only on "local_part" and "domain" which prevented
admin user from creating mailboxes from admin
2025-07-02 18:06:02 +02:00
Marie PUPO JEAMMET
7bebf13d88 🐛(domains) reduce logs around domain invitations
reduce logs and add tests around domain invitations
2025-06-21 00:15:16 +02:00
Marie PUPO JEAMMET
86c98cc426 🧑‍💻(dimail) modify makefile to setup dimail container upon running demo
Setup dimail container upon running demo so that it's always in sync.
2025-06-10 16:52:04 +02:00
Marie PUPO JEAMMET
0bbce9ffc8 🔥(dimail) remove obsolete user and allow creation in dimail setup
Remove obsolete duplication to dimail database.
See PR https://github.com/suitenumerique/people/pull/886 for more context.
2025-06-10 16:52:04 +02:00
Marie PUPO JEAMMET
fce9b1e490 🐛(dimail) fix broken auth while resetting passwords
Dimail client's "reset password" method was using basic auth while
dimail expects a token for this endpoint. Fixed it.
2025-05-20 16:45:14 +02:00
Marie PUPO JEAMMET
83bec33bdb ✏️(typo) fix typos
Did you know ? "Successful" actually takes two esses.
2025-05-20 16:45:14 +02:00
Marie PUPO JEAMMET
6e792986be (admin) send pending mailboxes from admin
Provides an admin action to send all pending mailboxes for an active domain.
This allows quick fixes when mailboxes fell out of sync.
2025-05-16 11:30:46 +02:00
Marie PUPO JEAMMET
2d56c57102 (dimail) add reset password method
allow domain owner and admins to reset password for a mailbox
they manage. The request is sent to dimail, which responds with
a new randomly generated password. This new password is sent to
secondary email.
2025-05-05 17:28:00 +02:00
Marie PUPO JEAMMET
056a4bd7ac 🛂(dimail) simplify interop with dimail
In this commit, we stop creating /users and /allows in dimail
for our dbs to be in sync. People with stop impersonating users
in dimail and will create mailboxes using its own credentials.
2025-04-23 16:24:53 +02:00
Sabrina Demagny
7a1fc6b626 (mailbox) remove secondary email as required field
The secondary email address is no longer required for all creation
processes and we should not force the user to provide and store an
insecure email address.
2025-04-10 12:59:16 +02:00
Sabrina Demagny
edbf77c525 💄(domain) enhance admin action label to import mailboxes
So far, "Synchronise from dimail" only import missing mailboxes
from dimail, so this label needs to be more explicit.
2025-04-08 21:39:16 +02:00
Quentin BEY
dd43483ce6 🔒️(passwords) add validators for production
This enabled various password validators to enforce password complexity.
2025-03-28 15:43:45 +01:00
Sabrina Demagny
3173e096d9 🐛(dimail) enhance sentry log for dimail error
Remove duplicate sentry log and fix failure if response content
has an unexpected format
2025-03-27 18:25:24 +01:00
Marie PUPO JEAMMET
8cbedeb76e ♻️(dimail) refacto setup_dimail_db to call dimail client
Management command "setup_dimail_db" called dimail directly, thus
creating duplicated code. It now calls "create_domain" and "create_allow"
methods from DimailAPIClient (create_user is left unchanged to create
special users such as dimail admin or people)
2025-03-27 18:06:36 +01:00
Sabrina Demagny
5178e460c4 (domains) notify support when domain status changes
During the scheduled task to check domains,
send an email notification to domain support if a
status has changed.
2025-03-25 08:44:35 +01:00
Sabrina Demagny
feb5d7154b (domains) define domain check interval as a settings
For now, to avoid overloading dimail, we have defined a
time interval between each check request to dimail.
This interval should be configurable for testing and
different environments.
2025-03-25 08:44:35 +01:00
Sabrina Demagny
666cafe220 📝(dimail) add some info about data required to create mailbox
Prepare generic mailbox implementation
2025-03-18 18:29:02 +01:00
Sabrina Demagny
74655ba378 🐛(domains) fix admin information messages not translated
Using format or f-string breaks translations
2025-03-14 12:26:52 +01:00
Sabrina Demagny
495245a752 🐛(domain) fix flaky test with translated email content
Do not test the content of emails sent with
a random user language
2025-03-14 12:26:52 +01:00
Sabrina Demagny
68ed5e4d55 (domains) add periodic task to fetch domains status
Add celery crontab to check and update domains status.
This task calls dimail API.
2025-03-12 17:08:45 +01:00
Sabrina Demagny
ebc2b02d22 🐛(domains) use a dedicated mail to invite user to manage domain
- modify models to allow to specify path to mail template
- rename team invitation template
- fix logo and text used for domain invitation email
2025-03-11 11:48:38 +01:00
Sabrina Demagny
701aeca763 🐛(mailbox) fix mailbox creation email language
Don't forget to translate mail content before sending.
2025-03-10 15:14:05 +01:00
Sabrina Demagny
7a128393f6 (api) define dimail timeout as a setting
Allow to param dimail timeout for each env
2025-03-10 10:18:14 +01:00
Laurent Bossavit
ae92ab5dd8 🐛(tests) change domain name factory to be more boring but reliable
MailDomain fixtures now use a boring non-repeating sequence. No
longer will the occasional random CI failure inject excitement
into our workdays; but fear not, there will remain other occasions
to enjoy the art of debugging.
2025-03-06 14:34:41 +01:00
Sabrina Demagny
91389181f0 🧑‍💻(admin) add admin for mail domain invitation
Allow to access to mail domain invitation table
on Django admin interface.
2025-03-06 13:28:52 +01:00
Sabrina Demagny
45bafe04de ♻️(backend) rename DomainInvitation
All models relacted to mail domain are prefixed
with "MailDomain". Do the same for mail domain invitations.
2025-03-06 13:01:04 +01:00
Sabrina Demagny
c90a74b362 🧑‍💻(tests) improve tests on logged info
Tests on log order make test maintenance difficult.
They are useless and make developers crazy each time
a log information is added :D
2025-03-06 09:57:09 +01:00
Sabrina Demagny
54df9af179 (domains) convert domain invitations to access roles
Use django signals to keep mailbox_manager logic
separated from people core
2025-03-06 09:57:09 +01:00
Marie PUPO JEAMMET
2224acf12d (api) allow invitations for domain management
add an endpoint to allow domain managers to invite someone on people,
using their email address
2025-03-06 09:57:09 +01:00
Marie PUPO JEAMMET
9ee1ef5ba0 🗃️(models) create abstract BaseInvitation and DomainInvitation models
create abstract BaseInvitation models to factorize common elements between
existing Invitation model team-side and new DomainInvitation model
2025-03-05 16:30:24 +01:00
Sabrina Demagny
d5b154fbe0 🐛(mailbox) fix migration to fill dn_email field
Fix AttributeError
'Mailbox' object has no attribute 'get_email'
2025-03-04 14:07:16 +01:00