happyDomain / happydomain

Finally a simple interface for domain names (mirror of framagit.org/happyDomain/happydomain)
https://www.happydomain.org/
Other
22 stars 1 forks source link

Escape from "domain already imported" #19

Open systemcrash opened 11 months ago

systemcrash commented 11 months ago

For whatever reason, e.g. incorrect auth details to a provider, it's possible to get stuck here:

Screenshot 2023-09-14 at 16 51 51

(trimmed out the name in the add field for security) Screenshot 2023-09-14 at 16 52 47

nemunaire commented 11 months ago

In fact, there is a uniqueness constraint on domain name, for all users (the NO_AUTH account is a real, special, user). So, this error appears because the domain already exists in the database. As it is not displayed here, it is necessarily registered for another user.

In order to solve the issue, you can use the administrative interface with ./hadmin.sh [route] [opts] (or docker exec -it happyDomain_ctr_name hadmin [route] [opts]):

./hadmin.sh /api/domains

This will show you all the registered domains on your instance. Then you can delete a domain with its id:

./hadmin.sh /api/domains/012345678abced -X DELETE

It should print true. And you should then be able to register your domain with the _NOAUTH account.


In the future, we'll eventually use another DB schema (with ACL on domain, to share a domain between several account), and get ride of this unwanted limitation. I don't think we'll plan to change the uniqueness behavior in the current schema.

systemcrash commented 11 months ago

Perhaps this last step would do well to be documented also: https://help.happydomain.org/en/deploy/docker/

I see advantages to having the uniqueness - altho two separate admins working independently is also a likely scenario. Just need to ensure fresh data, which can take a long time to pull in with some providers :/

Thanks for the help.