Commit Graph

29 Commits

Author SHA1 Message Date
Deluan Quintão 0ca0d5da22
Replace beego/orm with dbx (#2693)
* Start migration to dbx package

* Fix annotations and bookmarks bindings

* Fix tests

* Fix more tests

* Remove remaining references to beego/orm

* Add PostScanner/PostMapper interfaces

* Fix importing SmartPlaylists

* Renaming

* More renaming

* Fix artist DB mapping

* Fix playlist updates

* Remove bookmarks at the end of the test

* Remove remaining `orm` struct tags

* Fix user timestamps DB access

* Fix smart playlist evaluated_at DB access

* Fix search3
2023-12-09 13:52:17 -05:00
selfhoster1312 1e24809ed6
Create accounts automatically when authenticating from HTTP header (#2087)
* Create accounts automatically when authenticating from HTTP header

* Disable password check when header auth is enabled

* Formatting

* Password change is valid when no password (old or new) is provided

* Test suite runs with header auth disabled (mock config)
Prevents nil pointer access (panic) while testing password validating logic

* Use a constant prefix for autogenerated passwords (header auth case)

* Add tests

* Add context to log messages

Co-authored-by: Deluan <deluan@navidrome.org>
2023-01-24 20:18:10 -05:00
Deluan db67c1277e Fix error comparisons 2022-09-30 18:54:25 -04:00
Deluan 695f82a1a0 Upgrade to Beego 2's orm 2022-07-30 12:43:48 -04:00
Deluan 778f474d26 Use new `rest` lib (Update receives all columns that need to be updated) 2021-11-01 21:27:36 -04:00
Deluan fb183e58e9 Only encrypts NewPassword if it is not empty, when updating the user details. Fixes #1222 2021-07-01 16:09:49 -04:00
Brian Schrameck 167fe46288
Addresses a bug that would prevent users from changing their own passwords, introduced as part of #1187. (#1214) 2021-06-28 16:36:14 -04:00
Deluan Quintão 66b74c81f1
Encrypt passwords in DB (#1187)
* Encode/Encrypt passwords in DB

* Only decrypts passwords if it is necessary

* Add tests for encryption functions
2021-06-18 18:38:38 -04:00
Steve Richter e60f2bfa3d
User management improvements (#1101)
* Show more descriptive success messages for User actions

* Check username uniqueness when creating/updating User

* Adjust translations

* Add tests for `validateUsernameUnique()`

Co-authored-by: Deluan <deluan@navidrome.org>
2021-05-16 13:25:38 -04:00
Deluan 874b17b8f6 Require user to provide current password to be able to change it
Admins can change other users' password without providing the current one, but not when changing their own
2021-05-03 15:03:34 -04:00
Deluan 7feda4bea4 Add `EnableUserEditing`, to control whether a regular user can change their own details (default `true`) 2021-05-02 17:11:12 -04:00
Deluan a35de2bfd1 Allow regular users to change their info, including password.
Should fix #199
2021-04-28 22:35:25 -04:00
Deluan 6ee45a9ccc Move project to Navidrome GitHub organization 2021-02-06 21:46:35 -05:00
Deluan 861b406575 Use new simplified `uuid.NewString()` syntax 2021-02-01 01:22:31 -05:00
Deluan 596a4897a3 Do not force username to always be lowercase in the DB 2020-09-01 18:00:19 -04:00
Deluan b9b6ce066b Auto-Import playlists found in the Music Folder 2020-07-17 22:55:51 -04:00
Deluan 20075ae68d refactor: extracted restful helpers into their own composable struct 2020-03-21 20:00:46 -04:00
Deluan 6f5a322927 fix: login must be case-insensitive 2020-03-01 15:45:41 -05:00
Deluan 6978790e96 feat: allow regular users to login to the UI 2020-02-05 22:22:44 -05:00
Deluan 5d1df19291 fix: manually set timestamps, as we don't rely on the ORM anymore 2020-02-01 17:23:03 -05:00
Deluan 44671c59c0 refactor: fix rest filter 2020-02-01 17:23:03 -05:00
Deluan 71c1844bca refactor: new persistence, more SQL, less ORM 2020-02-01 17:23:03 -05:00
Deluan 58a7879ba8 feat: first time admin user creation through the ui 2020-01-25 17:10:16 -05:00
Deluan bee55c04c8 Rename project to Navidrome 2020-01-23 19:44:08 -05:00
Deluan 99c28731d4 Authenticate Subsonic API calls using the DB 2020-01-20 13:42:43 -05:00
Deluan e717d99780 Authenticate UI 2020-01-20 10:25:35 -05:00
Deluan 491bfb1f69 Create initial user if User table is empty. Also make model.QueryOptions compatible with rest.QueryOptions 2020-01-19 22:47:22 -05:00
Deluan 2ab0cecd48 Complete User CRUD 2020-01-19 21:46:36 -05:00
Deluan 1c04a19910 Add UserList in UI 2020-01-19 20:40:18 -05:00