1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-03 14:59:57 +00:00
Commit Graph

140 Commits

Author SHA1 Message Date
webplusai
e873518d6f
Admin configuration for anonymous read-write operations (#8736)
* mws authentication

* add more tests and permission checkers

* add logic to ensure that only authenticated users' requests are handled

* add custom login page

* Implement user authentication as well as session handling

* work on user operations authorization

* add middleware to route handlers for bags & tiddlers routes

* add feature that only returns the tiddlers and bags which the user has permission to access on index page

* refactor auth routes & added user management page

* fix Ci Test failure issue

* fix users list page, add manage roles page

* add commands and scripts to create new user & assign roles and permissions

* resolved ci-test failure

* add ACL permissions to bags & tiddlers on creation

* fix comments and access control list bug

* fix indentation issues

* working on user profile edit

* remove list users command & added support for database in server options

* implement user profile update and password change feature

* update plugin readme

* implement command which triggers protected mode on the server

* revert server-wide auth flag. Implement selective authorization

* ACL management feature

* Complete Access control list implementation

* Added support to manage users' assigned role by admin

* fix comments

* fix comment

* Add user profile management and account deletion functionality

* add success and error message feedback for user profile operations

* fix indentation issues

* Add command to create admin user if none exists when the start command is executed

* refactor annonymous user flow with create admin implementation

* remove mws-add-user from start command

* admin configuration for annonymous read-write opearations

* fix comments

* change get-anon handler to POST
2024-11-14 17:47:25 +00:00
webplusai
316bd65296
Add success and error message feedback for user profile operations (#8716)
* mws authentication

* add more tests and permission checkers

* add logic to ensure that only authenticated users' requests are handled

* add custom login page

* Implement user authentication as well as session handling

* work on user operations authorization

* add middleware to route handlers for bags & tiddlers routes

* add feature that only returns the tiddlers and bags which the user has permission to access on index page

* refactor auth routes & added user management page

* fix Ci Test failure issue

* fix users list page, add manage roles page

* add commands and scripts to create new user & assign roles and permissions

* resolved ci-test failure

* add ACL permissions to bags & tiddlers on creation

* fix comments and access control list bug

* fix indentation issues

* working on user profile edit

* remove list users command & added support for database in server options

* implement user profile update and password change feature

* update plugin readme

* implement command which triggers protected mode on the server

* revert server-wide auth flag. Implement selective authorization

* ACL management feature

* Complete Access control list implementation

* Added support to manage users' assigned role by admin

* fix comments

* fix comment

* Add user profile management and account deletion functionality

* add success and error message feedback for user profile operations

* fix indentation issues

* Add command to create admin user if none exists when the start command is executed

* refactor annonymous user flow with create admin implementation

* remove mws-add-user from start command
2024-11-08 10:09:42 +00:00
webplusai
c7531e53ab
Add user profile management and account deletion functionality (#8712)
* mws authentication

* add more tests and permission checkers

* add logic to ensure that only authenticated users' requests are handled

* add custom login page

* Implement user authentication as well as session handling

* work on user operations authorization

* add middleware to route handlers for bags & tiddlers routes

* add feature that only returns the tiddlers and bags which the user has permission to access on index page

* refactor auth routes & added user management page

* fix Ci Test failure issue

* fix users list page, add manage roles page

* add commands and scripts to create new user & assign roles and permissions

* resolved ci-test failure

* add ACL permissions to bags & tiddlers on creation

* fix comments and access control list bug

* fix indentation issues

* working on user profile edit

* remove list users command & added support for database in server options

* implement user profile update and password change feature

* update plugin readme

* implement command which triggers protected mode on the server

* revert server-wide auth flag. Implement selective authorization

* ACL management feature

* Complete Access control list implementation

* Added support to manage users' assigned role by admin

* fix comments

* fix comment

* Add user profile management and account deletion functionality
2024-10-30 18:38:21 +00:00
webplusai
6a7612ddf8
MWS authentication (#8596)
* mws authentication

* add more tests and permission checkers

* add logic to ensure that only authenticated users' requests are handled

* add custom login page

* Implement user authentication as well as session handling

* work on user operations authorization

* add middleware to route handlers for bags & tiddlers routes

* add feature that only returns the tiddlers and bags which the user has permission to access on index page

* refactor auth routes & added user management page

* fix Ci Test failure issue

* fix users list page, add manage roles page

* add commands and scripts to create new user & assign roles and permissions

* resolved ci-test failure

* add ACL permissions to bags & tiddlers on creation

* fix comments and access control list bug

* fix indentation issues

* working on user profile edit

* remove list users command & added support for database in server options

* implement user profile update and password change feature

* update plugin readme

* implement command which triggers protected mode on the server

* revert server-wide auth flag. Implement selective authorization

* ACL management feature

* Complete Access control list implementation

* Added support to manage users' assigned role by admin

* fix comments

* fix comment
2024-10-30 17:59:44 +00:00
Jeremy Ruston
5d6ddaee7e Fix plugin bag names 2024-10-17 15:51:01 +01:00
Jeremy Ruston
6dd6b7bef1 Refactor conditional function definitions
Function definitions within a condition do not function as expected thanks to JS hoisting, so it is better to avoid it, and keep ESLint happy as well.

See discussion at #8622 with @pmario
2024-09-30 15:28:37 +01:00
Jeremy Ruston
0f4f60f978 Fix load wiki folder command 2024-09-20 13:57:54 +01:00
Jeremy Ruston
4050ba5f92 Avoid optional chaining syntax
So that we can run on older Node.js versions
2024-09-11 19:22:29 +01:00
webplusai
a930411cfd
Handle directory creation if doesn't exist for test store (#8562)
* fix breaking bug in image tiddler attachment

* fix comments

* fix code format

* refactor processIncomingTiddler flow

* remove whitespaces after if statements

* refactor attachment_blob persistence flow

* refactor process tiddler to support different attachments

* add tests for attachment

* add more attachement test cases

* working on adding instanbul for test coverage report

* code coverage report generation

* remove unnecessary packages

* fix comments

* handle directory creation if doesn't exist for test store

* resolve issue with CI tests failure
2024-08-30 13:14:18 +01:00
Jeremy Ruston
8a5a684218 Clean ups from #8456 2024-08-28 17:16:35 +01:00
webplusai
3287dce40c
MWS: fix editing attachment tiddlers (#8455)
* fix breaking bug in image tiddler attachment

* fix comments

* fix code format

* refactor processIncomingTiddler flow

* remove whitespaces after if statements

* refactor attachment_blob persistence flow

* refactor process tiddler to support different attachments

* add tests for attachment

* add more attachement test cases

* working on adding instanbul for test coverage report

* code coverage report generation

* remove unnecessary packages

* fix comments
2024-08-28 17:13:52 +01:00
Jeremy Ruston
066771e6e9 Allow attachment handling to be switched off 2024-07-16 10:32:34 +01:00
Jeremy Ruston
b4664bd7d1 getBagTiddlerStream should return bagname 2024-07-16 10:31:13 +01:00
Jeremy Ruston
5b53a14903 Use $tw.utils.encodeURIComponentExtended for consistency with encodeuricomponent operator 2024-07-10 13:16:47 +01:00
poc2go
39b7a4fb71
Adds 'created' field to attachment meta.json file (#8356) 2024-07-09 16:35:18 +01:00
Jeremy Ruston
f1d0e52ff7 New commands 2024-07-05 18:40:59 +01:00
Jeremy Ruston
a37d50166f Tentative fix for SSE issue
See https://github.com/Jermolene/TiddlyWiki5/pull/7915#issuecomment-2124341900
2024-05-27 15:01:15 +01:00
Jeremy Ruston
268aaebaf0 Logging 2024-04-16 14:51:26 +01:00
Jeremy Ruston
ea318bab6e Fix file separator for Windows 2024-04-16 13:47:15 +01:00
Jeremy Ruston
aafe775779 Debugging 2024-04-16 12:49:09 +01:00
Jeremy Ruston
129bbe421c Debugging 2024-04-16 12:45:35 +01:00
Jeremy Ruston
471ba99a5d Debugging 2024-04-16 12:43:41 +01:00
Jeremy Ruston
516a17a6f0 More debugging 2024-04-16 12:41:50 +01:00
Jeremy Ruston
2e4980bb97 Add some error checking 2024-04-16 12:38:05 +01:00
Jeremy Ruston
cc4cb04900 Turn on WAL mode for better-sqlite3 2024-04-14 19:12:21 +01:00
Jeremy Ruston
9ba4556250 Add support for the plugin library
We create a system bag to contain each plugin/theme/language. It seems wasteful because it results in lots of bags, but the semantics are exactly right and so it seems like the right approach
2024-04-14 18:41:34 +01:00
Jeremy Ruston
ad528d6b1f Fix get wiki crash when serving a recipe with no tiddlers in it
Fixes #8110
2024-03-27 14:41:03 +00:00
Jeremy Ruston
7a0c43436f First pass at SSE support 2024-03-25 08:36:42 +00:00
Jeremy Ruston
708e21951f Fix syncing 2024-03-24 21:15:59 +00:00
Jeremy Ruston
6c9b92400e GET recipes/name/tiddlers.json should use include_deleted parameter 2024-03-24 18:32:56 +00:00
Jeremy Ruston
e66b67dedc Only turn binary tiddlers into attachments 2024-03-23 09:54:15 +00:00
Jeremy Ruston
a2012dcff8 Typo in comment 2024-03-23 09:54:03 +00:00
Jeremy Ruston
08649dd1eb More efficient syncing
Thank you @PotOfCoffee2Go I ended up taking some of your code from #8101 to get this up and running. There's still some stuff missing (like the tests!) but it gets things moving.
2024-03-23 09:27:54 +00:00
Jeremy Ruston
52f76380c7 Remove code relating to revision and bag as fields 2024-03-22 17:58:52 +00:00
Jeremy Ruston
3aa5607a3a Stop storing bag and revision details as tiddler fields
Instead we store them as dictionary tiddlers
2024-03-20 19:22:12 +00:00
Jeremy Ruston
eaebeb87c9 Include bagname in tiddler Etags 2024-03-20 18:52:54 +00:00
Jeremy Ruston
808b94468e Fix multipart form data POST test 2024-03-20 18:52:37 +00:00
Jeremy Ruston
60e6c8bcb2 Fix etag handling 2024-03-20 17:56:47 +00:00
Jeremy Ruston
6154de0d2c Rename misnamed route 2024-03-20 15:53:49 +00:00
Jeremy Ruston
ae8ef305fa Get rid of those annoying missing image icons
By adding a `?fallback=url` parameter to tiddler requests
2024-03-20 15:40:38 +00:00
Jeremy Ruston
9b3ca525ee Introduce multiwikiclient plugin
Routes are now rationalised, too.
2024-03-20 15:13:50 +00:00
Jeremy Ruston
6063256439 Create new static index route with ability to create/update bags and recipes
Also introduces a new /.system/filename route for stylesheets, scripts etc.
2024-03-20 09:44:52 +00:00
Jeremy Ruston
1c64646393 Fix quit command to work gracefully 2024-03-19 10:04:32 +00:00
Jeremy Ruston
259b3dca1b Add a new static index route 2024-03-18 22:26:24 +00:00
Jeremy Ruston
6a673e6aea Stop syncing state tiddlers to the admin wiki 2024-03-18 21:08:48 +00:00
Jeremy Ruston
f606e33415 Stop using the existing core server infrastructure
Too much of a constraint now that we're starting work on client-server sync
2024-03-18 08:44:45 +00:00
Jeremy Ruston
09de91940e Typo 2024-03-17 19:30:22 +00:00
Jeremy Ruston
3d485f0706 Expose tiddler_ids in bag and recipe listings 2024-03-17 16:34:45 +00:00
Jeremy Ruston
7eaa9b8aec Database methods that mutate tables should return IDs 2024-03-17 15:06:36 +00:00
Jeremy Ruston
faa4b9700a More consistent variable naming 2024-03-17 14:54:06 +00:00