* add default group slug to app info if public
* redirect public user to default group
* added tests
---------
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
* try to match units when brute parsing and no amount is matched
* brute parser: better handle multiple word food items
Also checks the case when a food might have been split in a unit + ingredient
* fix formatting
* add test cases for ingredient parsing that don't start with an amount
* parametrized tests and added ingredient data fixture
* fixed group_id ref in tests
* fixed test inputs
* add extra tests for units as third token
---------
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
* added more test data
* added missing pytest id
* add fk validation to backup restore
* removed bad type imports
* actually apply the invalid fk filter and clean up types
* fix key name
* added log when removing bad rows
* removed unused import
* bumped info to warning
* added test data to (hopefully) expose fk error
* added additional commits during migration
---------
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
* refactor normalized search migration to use dummy default
* changed group slug migration to use raw SQL
* updated comment
* added tests with anonymized backups (currently failing)
* typo
* fixed LDAP enum in test data
* fix for adding label settings across groups
* add migration data fixes
* fix shopping list label settings test
* re-run db init instead of just running alembic migration, to include fixes
* intentionally broke SQLAlchemy GUID handling
* safely convert between GUID types in different databases
* restore original test data after testing backup restores
* added missing group name update to migration
* add document title to server spa meta
* removed conflicting useMeta
* replaced head with useMeta
* formalized metadata injection
* small injection refactor
* added tests
* added missing global tag
* fixed setting tab title for logged-in users
* simplified metadata update
* remove duplicate tag and fix for foreign users
* add metadata for shared recipes
* added default recipe image
* fixed shared URL
---------
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
* 'hide' default email and password env variables
* first login API endpoint
* run code-generators
* frontend indicators for default username and pw
* remove old env variables from docs
* fix env set variable
* remove password from tests
* added plural names and alias tables to foods/units
* updated models to include plural names and aliases
* updated parser to include plural and aliases
* fixed migrations
* fixed recursive models
* added plural abbreviation to migration
* updated parser and display prop
* update displays to use plurals
* fix display edgecase and remove print
* added/updated display tests
* fixed model bug and added parser tests
* added tests for aliases
* added new plural options to data management page
* removed unique constraint
* made base dialog more customizable
* added alias management to food and unit data pages
* removed unused awaits
* 🧹
* add groupSlug to most routes
* fixed more routing issues
* fixed jank and incorrect routes
* remove public explore links
* remove unused groupSlug and explore routes
* nuked explore pages
* fixed public toolstore bug
* fixed various routes missing group slug
* restored public app header menu
* fix janky login redirect
* 404 recipe API call returns to login
* removed unused explore layout
* force redirect when using the wrong group slug
* fixed dead admin links
* removed unused middleware from earlier attempt
* 🧹
* improve cookbooks sidebar
fixed sidebar link not working
fixed sidebar link target
hide cookbooks header when there are none
* added group slug to user
* fix $auth typehints
* vastly simplified groupSlug logic
* allow logged-in users to view other groups
* fixed some edgecases that bypassed isOwnGroup
* fixed static home ref
* 🧹
* fixed redirect logic
* lint warning
* removed group slug from group and user pages
refactored all components to use route groupSlug or user group slug
moved some group pages to recipe pages
* fixed some bad types
* 🧹
* moved groupSlug routes under /g/groupSlug
* move /recipe/ to /r/
* fix backend url generation and metadata injection
* moved shopping lists to root/other route fixes
* changed shared from /recipes/ to /r/
* fixed 404 redirect not awaiting
* removed unused import
* fix doc links
* fix public recipe setting not affecting public API
* fixed backend tests
* fix nuxt-generate command
---------
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
* fix user creation when signups are supposed to be diabled
* add user registration tests
* run formatter
* fix test filename
---------
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
* fix new position calculataion
* ensure consistent list item ordering
* fix recipe ref overflow on small screens
* added recipe ref elevation
* tweaked line height (for long notes)
* removed unused user dependency
* remove old shopping list items when there's >100
* 🤷
* cleaned up function generator
* fixed test
* fix potential type error
* made max position calc more efficient
* fix(security): reset login attempts after successful login
Enforce a maximum number of consecutive failed logins. Successfully logging in should reset the
count.
#2569
* fix(security): fix when user is unlocked
The user should be unlocked when locked_at is set, but the lock has expired.
#2569
`email.com` is not a reserved domain, incorrect configuration could result in unintentional effects.
`example.com` is reserved by IANA for bogus purposes, see RFC 6761.
* added normalization to foods and units
* changed search to reference new normalized fields
* fix tests
* added parsed food matching to backend
* prevent pagination from ordering when searching
* added extra fuzzy matching to sqlite ing matching
* added tests
* only apply search ordering when order_by is null
* enabled post-search fuzzy matching for postgres
* fixed postgres fuzzy search test
* idk why this is failing
* 🤦
* simplified frontend ing matching
and restored automatic unit creation
* tightened food fuzzy threshold
* change to rapidfuzz
* sped up fuzzy matching with process
* fixed units not matching by abbreviation
* fast return for exact matches
* replace db searching with pure fuzz
* added fuzzy normalization
* tightened unit fuzzy matching thresh
* cleaned up comments/var names
* ran matching logic through the dryer
* oops
* simplified order by application logic
* fixed incorrect var ref
* added public recipe pagination route
* refactored frontend public/explore API
* fixed broken public cards
* hid context menu from cards when public
* fixed public app header
* fixed random recipe
* added public food, category, tag, and tool routes
* not sure why I thought that would work
* added public organizer/foods stores
* disabled clicking on tags/categories
* added public link to profile page
* linting
* force a 404 if the group slug is missing or invalid
* oops
* refactored to fit sidebar into explore
* fixed invalid logic for app header
* removed most sidebar options from public
* added backend routes for public cookbooks
* added explore cookbook pages/apis
* codegen
* added backend tests
* lint
* fixes v-for keys
* I do not understand but sure why not
---------
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
* added support for group slugs
* modified frontend to use links with group slug
* fixed test refs
* unused import
---------
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
* refactored recipe image paths/service
* added routes for updating/fetching timeline images
* make generate
* added event image upload and rendering
* switched update to patch to preserve timestamp
* added tests
* tweaked order of requests
* always reload events when opening the timeline
* re-arranged elements to make them look nicer
* delete files when timeline event is deleted
* Add hook for random sorting
* Add random sorting to front page
* Add multiple tests for random sorting.
* Be extra sure that all recipes are returned.
* Too stable random. seed doesn't reach backend.
* add timestamp to useRecipeSearch
* Update randomization tests for timestamp seeding
* ruff cleanup
* pass timestamp separately in getAll
* remove debugging log items
* remove timestamp from address bar
* remove defaults from backend timestamps
* timestamp should be optional
* fix edge case: query without timestamp
* similar edge case: no timestamp in pagination
* ruff :/
* better edge case handling
* stabilize random search test w/more recipes
* better pagination seeding
* update pagination seed test
* remove redundant random/seed check
* Test for api routes to random sorting.
* please the typing gods
* hack to make query parameters throw correct exc
* ruff
* fix validator message typo
* black reformatting
---------
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
* Creating postgres migration script and starting to set up to detect database
* non-working placeholders for postgres pg_tgrm
* First draft of some indexes
* non-working commit of postgres indexing
* Further non-working edits to db-centric fuzzy search
* update alembic for extensions
* More non-working setup
* Move db type check to init_db
* fix typo in db name check
* Add sqlite token search and postgres full text search
* reorder search to hit exact matches faster
* Add settings and docs for POSTGRES_LANGUAGE (full text search)
* Use user-specified POSTGRES_LANGUAGE in search
* fix fuzzy search typo
* Remove full text search and instead order by trigram match
* cleaner adding of indices, remove fulltext
* Cleanup old import of getting app settings
* Fix typo in index
* Fix some alembic fuzzy typos
* Remove diagnostic printing from alembic migration
* Fix mixed up commutator for trigram operator and relax criteria
* forgot to remove query debug
* sort only on name
* token and fuzzy search tests
* Refactor recipe search test to avoid rare random string cross-matches.
* Add ability to quote parts of search for exact match
* Remove internal punctuation, unless it's quoted for literal search
* Add tests for special character removal and literal search
* Remove the outer double quotes from searches, but leave internal single quotes alone.
* Update tests to avoid intra-test name collisions
* Fixing leftovers highlighted by lint
* cleanup linting and mypy errors
* Fix test cross-matching on dirty db (leftovers from bulk import)
* forgot to cleanup something when debugging mypy errors
* re-order pg_trgm loading in postgres
* address comments
* added support for SQL keywords IS, IN, LIKE, NOT
deprecated datetime workaround for "<> null"
updated frontend reference for "<> null" to "IS NOT NULL"
* tests
* refactored query filtering to leverage orm
* added CONTAINS ALL keyword
* tests
* fixed bug where "and" or "or" was in an attr name
* more tests
* linter fixes
* TIL this works
* extended query filter to accept nested tables
* decoupled timeline api from recipe slug
* modified frontend to use simplified events api
* fixed nested loop index ghosting
* updated existing tests
* gave mypy a snack
* added tests for nested queries
* fixed "last made" render error
* decoupled recipe timeline from dialog
* removed unused props
* tweaked recipe get_all to accept ids
* created group global timeline
added new timeline page to sidebar
reformatted the recipe timeline
added vertical option to recipe card mobile
* extracted timeline item into its own component
* fixed apploader centering
* added paginated scrolling to recipe timeline
* added sort direction config
fixed infinite scroll on dialog
fixed hasMore var not resetting during instantiation
* added sort direction to user preferences
* updated API docs with new query filter feature
* better error tracing
* fix for recipe not found response
* simplified recipe crud route for slug/id
added test for fetching by slug/id
* made query filter UUID validation clearer
* moved timeline menu option below shopping lists
---------
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
* implemented copymethat migration
* added migration tree
* added translation support
* genericized example jpgs
* added test data
* fixed test archive
* switched recipe create to service
added test for timeline event creation
* linting
* lxml go brrr
* add option to enable starttls for ldap
* add integration test for ldap service
* document new, optional environment variable
* fix: support anonymous bind
* id and mail attributes in LDAP_USER_FILTER should be implied
* remove print statement
* fix webhooks not firing due to missing session
* disable webhook test button because it doesnt do anything
* fix background task administration not working at all
* fix error in test
* adds authentication method for users
* fix db migration with postgres
* tests for auth method
* update migration ids
* hide auth method on user creation form
* (docs): Added documentation for the new authentication method
* update migration
* add to auto-form instead of having hidden fields