Commit Graph

95 Commits

Author SHA1 Message Date
Girish Ramakrishnan 12e073e8cf use node: prefix for requires
mostly because code is being autogenerated by all the AI stuff using
this prefix. it's also used in the stack trace.
2025-08-14 12:55:35 +05:30
Girish Ramakrishnan 622aecfd6d users: add unset route for avatar
also add missing tests for avatar and profile locking
2025-07-15 10:06:26 +02:00
Johannes Zellner 93db7ec71e Set the system language as the default for user profiles 2025-07-14 12:02:23 +02:00
Girish Ramakrishnan bba48f455e use @connect-lastmile 2025-07-10 11:00:31 +02:00
Johannes Zellner 846986987d the oidc module expect accountId and sub to be the same
in our case sub is the username exposed to the app, not the userId
internal to Cloudron

Upstream behavior change https://github.com/panva/node-oidc-provider/commit/9b89153c0ea2f2280a26e35f3b66d1900aed7c79
2025-07-02 00:38:11 +02:00
Johannes Zellner 713f1239c6 Allow admins to set users avatars 2025-06-30 22:44:59 +02:00
Girish Ramakrishnan a07d7ffdec profile: do not crash on invalid avatar id 2025-06-12 01:23:17 +02:00
Girish Ramakrishnan 1ca8eeeb50 split oidc into server and clients 2025-06-11 22:26:23 +02:00
Girish Ramakrishnan a93c85ebc9 profile: drop gravatar support
gravatar is owned by an external entity (Automattic) and we have an
unnecessary dep to this service. users can just upload a profile pic
2025-06-08 18:12:40 +02:00
Girish Ramakrishnan 344782099f add explicit unset for the image routes
the initial motivation was to fix up the profile avatar rule which
had a mix of json or multipart. this style does not work well with
express 5
2025-06-06 18:58:49 +02:00
Johannes Zellner 2a6544b794 We always require a language property when setting a users language 2025-03-29 21:15:48 +01:00
Girish Ramakrishnan 8e58349bfa replace with custom superagent based on fetch API 2025-02-15 15:14:09 +01:00
Girish Ramakrishnan 6004cd17bf notifications: per user email prefs 2024-12-11 19:12:20 +01:00
Girish Ramakrishnan 1b22ea661c avatar: deliver .png images
this is required for mastodon atleast. if the oidc avatar url, returns
an svg, it crashes!

the profile pic png was created using inkspace:
inkscape -w 96 -h 96 avatar-default-symbolic.svg -o avatar-default-symbolic.png
2024-10-18 22:39:18 +02:00
Girish Ramakrishnan efc3c7532e Move requires to the top 2024-10-18 21:50:38 +02:00
Girish Ramakrishnan c85c0558b9 multipart: cleanup files after reading their contents
one idea is just use express.raw() . however, we have to implement some
file size limit there.

one case this does not handle is aborted uploads from a box.service restart.
for this rare case, a server reboot will clean up /tmp anyway.
2024-07-19 23:11:26 +02:00
Girish Ramakrishnan b4e7e394c3 split routes and model code into user-directory.js 2024-06-12 10:49:01 +02:00
Girish Ramakrishnan 6525504923 profile: store preferred language in the database 2024-02-26 13:30:35 +01:00
Johannes Zellner b03240ccb8 Send avatarType explicitly in profile 2024-01-29 13:51:03 +01:00
Johannes Zellner c8b997f732 Always send an image as avatar 2024-01-29 13:21:19 +01:00
Johannes Zellner 80e83e0c05 Always send images for profile 2024-01-27 22:55:10 +01:00
Johannes Zellner b8be174610 Send proper content type for avatar 2024-01-23 17:57:22 +01:00
Girish Ramakrishnan d7dda61775 profile: unify password verification check 2024-01-22 14:03:23 +01:00
Girish Ramakrishnan 13b9bed48b externalldap: when using cloudron source, disable local 2fa setup 2024-01-20 12:44:19 +01:00
Girish Ramakrishnan f43a601e86 profile: email change now requires password 2024-01-18 18:11:42 +01:00
Girish Ramakrishnan 053f81a53e externalldap: add tests 2024-01-07 22:04:22 +01:00
Girish Ramakrishnan 4997ad0468 Fix status codes of 2fa routes 2023-09-13 21:07:07 +05:30
Girish Ramakrishnan d12e6ee2b3 settings: make user_directory setting route 2023-08-03 08:29:12 +05:30
Girish Ramakrishnan 53e9eccf72 unify totp check
the totp check is done in several places causing errors like 3552232e99

* ldap (addon)
* accesscontrol (dashboard)
* proxyauth
* directoryserver (exposed ldap)
* externalldap (the connector)

The code also makes externalldap auto-create work now across all the cases where there is a username
2023-03-12 16:01:12 +01:00
Johannes Zellner aa1e8dc930 Give the dashboard a way to check backgroundImage availability 2022-05-17 15:25:44 +02:00
Johannes Zellner f3c66056b5 Allow to unset background image 2022-05-17 13:17:05 +02:00
Johannes Zellner 6bd478b8b0 Add profile backgroundImage api 2022-05-15 12:08:11 +02:00
Girish Ramakrishnan 97e439f8a3 more profileConfig rename 2022-01-13 16:49:06 -08:00
Girish Ramakrishnan 445c83c8b9 make auditsource a class
this allows us to use AuditSource for the class and auditSource for
the instances!
2021-09-30 10:13:36 -07:00
Girish Ramakrishnan a78178ec47 redact password immediately after verify 2021-09-14 10:36:14 -07:00
Johannes Zellner 59cbac0171 Require password for fallback email change 2021-09-09 23:22:00 +02:00
Girish Ramakrishnan 03e22170da appstore and support: async'ify 2021-08-18 23:38:18 -07:00
Girish Ramakrishnan 200018a022 settings: async'ify
* directory config
* unstable app config
2021-08-18 15:46:08 -07:00
Girish Ramakrishnan a1c61facdc merge userdb.js into users.js 2021-07-16 22:33:22 -07:00
Johannes Zellner 0db62b4fd8 Make avatar apis buffer based 2021-07-08 11:17:13 +02:00
Johannes Zellner 81e6cd6195 Make gravatar support explicit only 2021-07-07 16:16:04 +02:00
Girish Ramakrishnan 147c8df6e3 async'ify avatar and apppassword code 2021-06-25 23:32:21 -07:00
Girish Ramakrishnan b8ea9de439 move profile icons into the database 2021-04-29 13:57:24 -07:00
Girish Ramakrishnan 8c7eff4e24 user: add routes to set/clear avatar 2020-07-10 07:23:38 -07:00
Girish Ramakrishnan c6c584ff74 user: move avatar handling into model code 2020-07-10 07:01:15 -07:00
Girish Ramakrishnan 64bc9c6dbe disable profile view for all users to avoid confusion 2020-07-09 21:54:09 -07:00
Girish Ramakrishnan 0f5b7278b8 add directory config setting
part of #704
2020-07-09 16:02:58 -07:00
Girish Ramakrishnan 0e156b9376 migrate permissions and admin flag to user.role 2020-02-21 16:49:20 -08:00
Girish Ramakrishnan c537dfabb2 add manage user permission 2020-02-13 22:49:58 -08:00
Girish Ramakrishnan d1911be28c user: load the resource with middleware 2020-02-13 20:59:17 -08:00