Implement Public Shelves (#1969)
* Implement Public Shelves
Multiple changes to support shelves being marked as public.
- **Backend:**
- Added 'isPublic' field the Shelves
- Made it so that when looking for shelves it includes public ones
- Allow admins to mark shelves are public
- Added 'bookCount' to 'Shelf' so it shows for public shelves as
well
- Added 'canReadShelf' to 'SecurityUtil' for checking read access to
public shelves.
- Updated ShelfController to use this for getting shelf data
- **Frontend:**
- Updated Shelf to include 'publicShelf', 'userId', and 'bookCount'
- Updated components to allow admins to toggle shelf visibility.
- Modified 'ShelfService' to:
- Add 'getBooksOnShelf' method to fetch books from the API.
- Update /getBookCount' to use 'Shelf.bookCount' for non-owners.
- Restricted edit/delete options to shelf owners.
* Renumber Add_is_public_to_shelf.sql
Conflicted with another
---------
Co-authored-by: ACX <8075870+acx10@users.noreply.github.com>
This commit is contained in:
@@ -6,4 +6,7 @@ export interface Shelf {
|
||||
icon: string;
|
||||
iconType?: 'PRIME_NG' | 'CUSTOM_SVG';
|
||||
sort?: SortOption;
|
||||
publicShelf?: boolean;
|
||||
userId?: number;
|
||||
bookCount?: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user