0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 20:42:43 +00:00
Commit Graph

305 Commits

Author SHA1 Message Date
David Bolack
c7610cf0f8 Run patch processing in parallel to prior system to attempt to narrow down not-quite-so-edge cases that did not come up prior to user testing. 2025-07-10 07:10:13 -05:00
Trevor Buckner
7ba7991631 Additional diff server error logging 2025-07-10 00:37:03 -04:00
Trevor Buckner
daf4eceedd Small rearrangement 2025-07-09 22:09:16 -04:00
David Bolack
a02361ee65 Move normalization to before diffing 2025-07-09 19:37:57 -05:00
David Bolack
81e20f032e NOrmalize strings before rnuning MD5s 2025-07-09 18:52:45 -05:00
David Bolack
0f4157d084 Add Patch wrapper/unwrapper for saves
Object encapsulation for the win?
2025-07-09 17:16:47 -05:00
Trevor Buckner
6414e73e7d Cleanup and better handling of pre-save snapshot 2025-07-08 15:50:27 -04:00
Trevor Buckner
41daf8d172 comment out hash check 2025-07-07 21:05:50 +00:00
Trevor Buckner
4c897fdeb5 Add MD5 hash check 2025-07-07 21:00:03 +00:00
Trevor Buckner
e1e661976d Initial test 2025-06-27 08:07:02 -04:00
Trevor Buckner
862fa7de89 Don't send full text back to client on save
We return the stub after saving. When saving to HB MongoDB, the stub also includes the full text. This does not need to be sent back to the client.
2025-06-24 17:44:22 -04:00
Víctor Losada Hernández
9c1a0fd798 Merge branch 'master' into addLockRoutes-#3326 2025-04-10 13:46:15 +02:00
David Bolack
c6cd6e9864 A little bit of cleanup and structure flattening
Fixes failed tests.
2025-04-08 20:29:32 -05:00
G.Ambatte
be2f1786b5 Add authors to locked brew error message 2025-04-09 09:59:34 +12:00
David Bolack
d0c3765f8f Move Snippets store to metadata block.
Note this still stores the snippets as a string for the passed about brew object.
2025-04-07 23:22:47 -05:00
G.Ambatte
1ded1cad5a Change accessType check 2025-04-08 09:28:54 +12:00
G.Ambatte
7765cb31bf Merge branch 'master' into addLockRoutes-#3326 2025-03-27 17:43:21 +13:00
David Bolack
2f95cc5f45 Merge branch 'master' into localSnippetEditor 2025-03-24 15:10:25 -05:00
Víctor Losada Hernández
f076e05f49 js files 2025-03-18 19:46:11 +01:00
David Bolack
ab6c1ae402 Merge branch 'master' into localSnippetEditor 2025-03-14 17:44:32 -05:00
Trevor Buckner
94f478477d Add test for missing meta:theme tag 2025-02-13 16:20:50 -05:00
Trevor Buckner
d8d672fada Error message if chosen theme does not have "meta:theme" tag. 2025-02-13 15:51:06 -05:00
Trevor Buckner
c080e5b191 Add author to snippetBundle 2025-02-10 22:20:12 -05:00
David Bolack
74122d9057 Display name of write in theme next to write-in
Clear user's active ThemeBundle when an incomplete/broken/invalid writein.

Needs theming help.
2025-01-07 22:11:01 -06:00
David Bolack
9745daf6e2 Merge branch 'master' into writeinBrewTheme 2024-12-20 15:19:06 -06:00
David Bolack
5f54777663 Merge branch 'master' into localSnippetEditor 2024-12-20 15:18:25 -06:00
Trevor Buckner
57467701d0 Fetch Google Brew if only stub requested but nothing found
/update/ requests only the stub for updating. But if no stub exists, we should fetch the full brew so we return *something*.
2024-12-18 23:00:01 -05:00
Trevor Buckner
5f14f656ef Logging 2024-12-18 17:23:38 -05:00
Trevor Buckner
6e8a0d7314 current user owns 0-author brew only if edit mode
Previous code was treating /share/ visits to google brews with no stub as visits by owner, thus using their own credentials to open the file instead of serviceaccount
2024-12-18 17:07:09 -05:00
Trevor Buckner
e61144beb8 Mark as owner if stub doesn't exist
Old Google Drive files without a stub have no author, so if no stub exists, consider the current user the owner.
2024-12-18 13:45:53 -05:00
Trevor Buckner
64b792c645 Fix case where no stub is found
When retrieving a Google Brew with no stub yet, if the user is not logged in or has expired credentials, we enter this error handler. However, the error message itself tries to send a list of authors.

If there was no stub, we crash here with a 500 error.

This adds conditional operator to any stub value so we can send the actual "not logged in" error in case of no stub.
2024-12-18 13:02:14 -05:00
Víctor Losada Hernández
99f2972079 fixes as asked 2024-12-14 23:34:12 +01:00
David Bolack
47d7c69d1b Merge branch 'master' into writeinBrewTheme 2024-12-10 23:20:48 -06:00
David Bolack
12c155b46f Merge branch 'master' into localSnippetEditor 2024-12-10 21:17:51 -06:00
Trevor Buckner
9758797e2b If user is owner, fetch Google Brew with user auth
Fixes the case where a user can see a Google Brew under their account (`listBrew()` uses their personal auth) but can't actually delete it (`getBrew()`  only uses the serviceAccount). Occurs if a Google brew has lost its permissions somehow (set to "restricted", etc.) such that serviceAccount can no longer interact with it.
2024-12-08 23:42:14 -05:00
Trevor Buckner
74a7983757 Refactor and clean up "getBrew()"
Some redundant logic and sprawling formatting
2024-12-08 23:39:26 -05:00
David Bolack
73c68fd11c Functional first pass.
Needs:

 - [ ] opinions on UI placement
 - [ ] opinions on best choice for displaying a write-in based User Brew ( flip to writin box? Add to drop-down list? )
2024-11-27 21:35:29 -06:00
David Bolack
b6e445c445 Convert storage of snippets in Brew to yaml by request. 2024-11-24 18:13:32 -06:00
David Bolack
5f67494f77 Merge branch 'master' into localSnippetEditor 2024-11-23 01:39:38 -06:00
Trevor Buckner
fb9148ada5 Site runs and all tests pass 2024-11-20 16:21:35 -05:00
David Bolack
83abdc2ee6 Merge branch 'master' into localSnippetEditor 2024-11-12 18:42:50 -06:00
G.Ambatte
033b7fa44f Lint fix 2024-11-10 19:35:57 +13:00
G.Ambatte
bd26f02ddb Remove getBrew admin regex search 2024-11-10 19:23:42 +13:00
David Bolack
b9b3d284cf WOrking snippet editor - menu population regression 2024-11-03 11:14:31 -06:00
David Bolack
4f240bf110 WIP 2024-11-02 22:30:18 -05:00
David Bolack
4448410c3e Partial implementation 2024-11-01 14:02:27 -05:00
G.Ambatte
63f6f6d3c6 Fix new getBrew access type 2024-10-25 11:27:28 +13:00
G.Ambatte
948f03b5b8 Add admin access type to getBrew 2024-10-25 11:18:36 +13:00
Trevor Buckner
6d4b1843ae Fix missed lines from 3.15.2 branch 2024-10-12 00:10:43 -04:00
Trevor Buckner
ff9a75f6b6 Remove duplicate error logs for google drive update / new
Errors are now logged once in the central error handler in app.js
2024-09-26 19:00:07 -04:00