Commit graph

178 commits

Author SHA1 Message Date
Víðir Valberg Guðmundsson
0b2d6b9dc4 Notify via matrix when a new membership application is submitted. (#87)
Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/87
Reviewed-by: benjaoming <benjaoming@data.coop>
Co-authored-by: Víðir Valberg Guðmundsson <valberg@orn.li>
Co-committed-by: Víðir Valberg Guðmundsson <valberg@orn.li>
2025-03-30 20:37:36 +00:00
reynir
5922c3245c Make drone-docker use BuildKit (#85)
Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/85
2025-03-26 10:06:37 +00:00
Reynir Björnsson
201da8177f Make drone-docker use BuildKit 2025-03-26 11:03:52 +01:00
Víðir Valberg Guðmundsson
328c8f59d2 Bite the bullet and remove heredoc. 2025-03-21 21:56:09 +01:00
Víðir Valberg Guðmundsson
415b47ad59 Version? 2025-03-21 21:53:22 +01:00
Víðir Valberg Guðmundsson
d7a4f8ab7c Add syntax spec to Dockerfile. 2025-03-21 21:52:08 +01:00
Víðir Valberg Guðmundsson
c80f4f3c7b Try a older version. 2025-03-21 21:49:42 +01:00
Víðir Valberg Guðmundsson
22781477f3 Pin the docker plugin for building. 2025-03-21 21:47:32 +01:00
Víðir Valberg Guðmundsson
938556cb60 An application form! (#83)
Co-authored-by: bbb <benjamin@overtag.dk>
Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/83
Reviewed-by: benjaoming <benjaoming@data.coop>
Co-authored-by: Víðir Valberg Guðmundsson <valberg@orn.li>
Co-committed-by: Víðir Valberg Guðmundsson <valberg@orn.li>
2025-03-08 22:10:26 +00:00
Reynir Björnsson
b3b30e05ed bootstrap_dev_data: add products & membership types (#80)
Addresses #79

Co-authored-by: Víðir Valberg Guðmundsson <valberg@orn.li>
Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/80
Reviewed-by: benjaoming <benjaoming@data.coop>
Co-authored-by: Reynir Björnsson <reynir@reynir.dk>
Co-committed-by: Reynir Björnsson <reynir@reynir.dk>
2025-03-07 19:38:24 +00:00
Víðir Valberg Guðmundsson
1adaf5e341 Upgrade django-registries. 2025-03-04 21:34:56 +01:00
Víðir Valberg Guðmundsson
d31d31485c Ran pre-commit run --all-files. 2025-03-03 19:23:48 +01:00
Reynir Björnsson
c9b0c19fec Fix type errors (#81)
This brings down the number of type errors from 118 down to 92. I think most of the remaining errors are due to the */models.py files where I'm not sure what to do about it. I run the type checker in docker via `just typecheck`.

The change in 0af3fbcac4 requires this change upstream: https://github.com/valberg/django-registries/pull/28 we can omit that commit for now.

Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/81
Reviewed-by: benjaoming <benjaoming@data.coop>
Co-authored-by: Reynir Björnsson <reynir@reynir.dk>
Co-committed-by: Reynir Björnsson <reynir@reynir.dk>
2025-03-03 18:20:28 +00:00
Reynir Björnsson
408970f16e Create subscription periods in bootstrap_dev_data (#78)
Otherwise the /admin/members/ endpoint fails. Related to #77.

The README should also be updated to reflect that you should probably do the bootstrap_dev_data on first setup.

Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/78
Reviewed-by: valberg <valberg@orn.li>
Co-authored-by: Reynir Björnsson <reynir@reynir.dk>
Co-committed-by: Reynir Björnsson <reynir@reynir.dk>
2025-03-01 13:50:21 +00:00
reynir
b64779c780 Remove the sign-up for now (#72)
Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/72
Reviewed-by: reynir <data.coop@reynir.dk>
2025-02-10 10:44:20 +00:00
bbb
4e10d7d000
Change link label for people who never received a password 2025-02-08 12:06:57 +01:00
bbb
22fcd25f55
Remove sign-up link for now 2025-02-08 12:04:38 +01:00
bbb
dbd851bf19 Add modified to Order Admin list display (#71)
icanhaz? 🥺

Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/71
Reviewed-by: reynir <data.coop@reynir.dk>
Co-authored-by: bbb <benjamin@overtag.dk>
Co-committed-by: bbb <benjamin@overtag.dk>
2025-02-05 07:53:14 +00:00
Víðir Valberg Guðmundsson
257f1a26eb Add a custom OAuth2 validator to provide some more info in the OIDC dance. 2025-02-02 14:41:11 +01:00
Víðir Valberg Guðmundsson
78f36c1502 Add assigned_to field to ServiceRequest. Ensure a administrator group exists. Close #66. 2025-02-02 14:29:50 +01:00
Víðir Valberg Guðmundsson
314416740f Do not replace spaces in private key. Error was in environment definition in ansible repo. 2025-02-01 22:13:38 +01:00
Víðir Valberg Guðmundsson
630a098ba5 Replace spaces in private key. 2025-02-01 21:49:45 +01:00
Víðir Valberg Guðmundsson
cd467adb06 Set PKCE_REQUIRED to False for now. 2025-02-01 21:40:12 +01:00
Víðir Valberg Guðmundsson
860d8ed5b2 Default must be set for running manage.py during docker build. 2025-02-01 21:12:53 +01:00
Víðir Valberg Guðmundsson
b3bf381186 Get OIDC_RSA_PRIVATE_KEY from environment. 2025-02-01 21:09:39 +01:00
Víðir Valberg Guðmundsson
ee537adc05 Configure ruff and fix issues. (#64)
Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/64
Co-authored-by: Víðir Valberg Guðmundsson <valberg@orn.li>
Co-committed-by: Víðir Valberg Guðmundsson <valberg@orn.li>
2025-01-26 12:44:10 +00:00
Víðir Valberg Guðmundsson
21b59467ea Add a way to make it easy to reset the database with some testing data. 2025-01-22 22:35:09 +01:00
Víðir Valberg Guðmundsson
e2cb4b220d Fix CSS stuff (#61)
Co-authored-by: Halfdan Mouritzen <halfdan@robothangarskib.dk>
Co-authored-by: halfd <halfd@noreply@git.data.coop>
Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/61
Co-authored-by: Víðir Valberg Guðmundsson <valberg@orn.li>
Co-committed-by: Víðir Valberg Guðmundsson <valberg@orn.li>
2025-01-22 21:26:06 +00:00
Víðir Valberg Guðmundsson
cda633134e Fix wrong field. 2025-01-16 08:27:46 +01:00
Víðir Valberg Guðmundsson
9b78e81f00 Add missing migrations. 2025-01-16 08:20:58 +01:00
benjaoming
ee46541025 Fix renamed field (#60)
Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/60
2025-01-15 13:06:26 +00:00
bbb
83b3e42192
Fix renamed field 2025-01-15 14:05:34 +01:00
bbb
43d19d3106 New Service Request setup (#59)
* [x] Adds a ServiceRequest model for all service types
* [x] Pre-define simple service requests to begin with
* [x] Django admin for admins to handle requests
* [x] Notifications for Matrix
* [x] Moved Service Access to `services` app
* [x] Auto-create default service requests for new memberships
* [x] Most simple kinds of tests added
* [x] Fix issue in generating service requests (check for service access firstly)
* [ ] Channel and bot account

## Deployment

1. Create a bot account. Get an access token with:

   ```
   curl -XPOST \
     -d '{"type":"m.login.password", "user":"<userid>", "password":"<password>"}' \
     "https://data.coop/_matrix/client/r0/login"
   ```

2. Create an admin room for admins. Add admins + bot. Copy the room ID.
3. Add new environment variables for the setup `MATRIX_ACCESS_TOKEN` and `MATRIX_SERVICE_REQUEST_ADMIN_ROOM`

Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/59
Co-authored-by: bbb <benjamin@overtag.dk>
Co-committed-by: bbb <benjamin@overtag.dk>
2025-01-15 07:16:12 +00:00
Víðir Valberg Guðmundsson
c4df844da6 Move to uv - it is the hot new thing. 2024-12-26 13:24:25 +01:00
Víðir Valberg Guðmundsson
3dd7352d90 Services (#25)
Dette PR handler om at få en måde hvorpå medlemmer kan få adgang til de forskellige services vi udbyder.

Co-authored-by: Halfdan Mouritzen <halfdan@robothangarskib.dk>
Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/25
Reviewed-by: benjaoming <benjaoming@data.coop>
Co-authored-by: Víðir Valberg Guðmundsson <valberg@orn.li>
Co-committed-by: Víðir Valberg Guðmundsson <valberg@orn.li>
2024-12-22 23:46:13 +00:00
Benjamin Bach
43d5dcbd52 Set FROM field on emails (#55)
Fixes #54

Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/55
Co-authored-by: Benjamin Bach <benjamin@overtag.dk>
Co-committed-by: Benjamin Bach <benjamin@overtag.dk>
2024-08-14 20:44:11 +00:00
Benjamin Bach
f5feda3414 Fix invite text and add accounting context to translation messages (#53)
Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/53
Co-authored-by: Benjamin Bach <benjamin@overtag.dk>
Co-committed-by: Benjamin Bach <benjamin@overtag.dk>
2024-08-14 19:52:09 +00:00
Benjamin Bach
3659cf40df Add more precision to the order email (#51)
Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/51
Co-authored-by: Benjamin Bach <benjamin@overtag.dk>
Co-committed-by: Benjamin Bach <benjamin@overtag.dk>
2024-08-14 10:08:01 +00:00
Benjamin Bach
8f3e8f06f0 Remove unique constraint from initial field (#50)
Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/50
Reviewed-by: valberg <valberg@orn.li>
Co-authored-by: Benjamin Bach <benjamin@overtag.dk>
Co-committed-by: Benjamin Bach <benjamin@overtag.dk>
2024-08-14 09:37:13 +00:00
Benjamin Bach
b3795977ed Membership invitations and order emails (#47)
* [x] Create invite emails from admin
* [x] Sign up on special invite form (create password and username)
* [x] Create email with unpaid orders and payment links
* [x] Lodge unpaid orders somewhere in UI for visibility

Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/47
Reviewed-by: valberg <valberg@orn.li>
Co-authored-by: Benjamin Bach <benjamin@overtag.dk>
Co-committed-by: Benjamin Bach <benjamin@overtag.dk>
2024-08-14 09:17:29 +00:00
Benjamin Bach
c81481747f Add a footer link to the git repo (#49)
Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/49
Reviewed-by: valberg <valberg@orn.li>
Co-authored-by: Benjamin Bach <benjamin@overtag.dk>
Co-committed-by: Benjamin Bach <benjamin@overtag.dk>
2024-08-14 05:08:02 +00:00
Víðir Valberg Guðmundsson
52b38abf2a chore: cleanup and fix Dockerfile for development 2024-08-09 08:33:14 +02:00
Benjamin Bach
00c615f318 More admin controls + Fix pay/success error 500 (#45)
Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/45
Reviewed-by: valberg <valberg@orn.li>
Co-authored-by: Benjamin Bach <benjamin@overtag.dk>
Co-committed-by: Benjamin Bach <benjamin@overtag.dk>
2024-08-04 17:12:02 +00:00
Benjamin Bach
1070e93885 Divide the amount received from Stripe by 100.0 (#40)
Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/40
Reviewed-by: valberg <valberg@orn.li>
Co-authored-by: Benjamin Bach <benjamin@overtag.dk>
Co-committed-by: Benjamin Bach <benjamin@overtag.dk>
2024-08-04 07:34:50 +00:00
Víðir Valberg Guðmundsson
ca8987ba3b Use mail_admins instead of send_mail. 2024-08-03 20:53:18 +02:00
Benjamin Bach
4254baf09d Changes to payment models (#32)
Flagging incoming changes, no actions required.

This is stuff I consider "MVP", as in what we need urgently to send out payment links to members and receive payments via Stripe.

- [x] Allow products, orders etc
- [x] Define several products per membership type
- [x] Possibility to create a membership BEFORE it's paid
- [x] Mark memberships active when payments are received
- [x] Create membership history for each member (via Django admin)
- [x] Efficiently mark members in a list and choose "create <membership type> for current year with an unpaid order" (Django Admin actions)
- [x] Order payment page w/ Stripe integration
- [ ] Send email with order payment link
- [ ] Send payment confirmation emails
- [x] Re-generate migrations

Co-authored-by: valberg <valberg@orn.li>
Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/32
Reviewed-by: valberg <valberg@orn.li>
Co-authored-by: Benjamin Bach <benjamin@overtag.dk>
Co-committed-by: Benjamin Bach <benjamin@overtag.dk>
2024-08-03 17:55:32 +00:00
Benjamin Bach
59620aa309 Switch to using uv instead of pip-tools (#39)
Seems to work!

Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/39
Reviewed-by: valberg <valberg@orn.li>
Co-authored-by: Benjamin Bach <benjamin@overtag.dk>
Co-committed-by: Benjamin Bach <benjamin@overtag.dk>
2024-08-02 22:58:19 +00:00
Benjamin Bach
865bc6c7bd New WaitingListEntry (#33)
Sorted the pre-commit things... some were because of `src/static` being included, and some have been fixed in another PR 🎉

Reviewed-on: https://git.data.coop/data.coop/membersystem/pulls/33
Reviewed-by: valberg <valberg@orn.li>
Co-authored-by: Benjamin Bach <benjamin@overtag.dk>
Co-committed-by: Benjamin Bach <benjamin@overtag.dk>
2024-07-31 22:49:46 +00:00
Víðir Valberg Guðmundsson
0cf579c5f6 Update dockerfile to using bookworm, and to avoid invalidating cache unless updating requirements. 2024-07-31 23:48:39 +02:00
Víðir Valberg Guðmundsson
7a3a629d6f Update requirements compilation to use hatch-pip-compile. 2024-07-31 23:26:40 +02:00