Commit Graph
943 Commits
Author SHA1 Message Date
REDCODE d7f8350ae7 fix: add cascade checkbox to CosplayerDetail album visibility modal 2026-07-15 22:58:36 +02:00
REDCODE f0e3cc9c37 feat: cascade visibility to albums and assets with lower-only rule
- VisibilityModal: add optional CascadeLabel + CascadeEnabled for checkbox
- Albums page: checkbox to cascade album visibility to non-deleted assets
  (lower-only: never raise asset visibility)
- PersonForm: cascade checkboxes when editing cosplayer visibility
  - Cascade to albums (lower only)
  - Cascade to assets in every album (only if album cascade enabled)
- Inject AssetService in Albums page and PersonForm
2026-07-15 22:41:13 +02:00
REDCODE 4f56af252b refactor: extract VisibilityModal shared component, add editing controls to Albums page
- Create MilkStream.Client/Components/Shared/VisibilityModal.razor
- Replace duplicated modal markup in AlbumDetail, CosplayerDetail, Albums
- Add Select All/Deselect All to Albums via AlbumGrid ref
- Add Delete, Visibility modal to Albums select mode
- Add mobile dropdown to Albums action buttons
- Add GetCurrentAlbumIds() to AlbumGrid for Select All support
2026-07-15 22:31:41 +02:00
REDCODE 8aeb4df064 fix: wrap CosplayerDetail action buttons into mobile dropdown 2026-07-15 22:24:07 +02:00
REDCODE dc2983ae55 fix: album-card-select and cosplayer-card-select only on selected cards 2026-07-15 22:23:01 +02:00
REDCODE a50dc3aa30 fix: prevent jagged wrapping of toolbar and action buttons
SortFilterBar: wrap search+sort in flex-nowrap row, remove ms-auto
from ActionButtons so wrapped items are left-aligned and clean.
AlbumDetail: add flex-shrink: 0 to action buttons container.
2026-07-15 22:19:42 +02:00
REDCODE 3cdad1cebd feat: add album-level bulk actions to CosplayerDetail page
- Add BulkUpdateAlbumsAsync to AlbumService
- Fix AlbumCard border gate from IsAdminOrCurator to CanEdit()
- CosplayerDetail: Delete, Unlink, Visibility buttons in select mode
- CosplayerDetail: Select All / Deselect All button
- CosplayerDetail: visibility breakdown stats in header
- CosplayerDetail: visibility modal for albums
2026-07-15 22:14:18 +02:00
REDCODE 0903da4490 fix: show borders for maintainers in select mode 2026-07-15 22:07:38 +02:00
REDCODE 2fcd6467e1 feat: add Select All / Deselect All button in album select mode 2026-07-15 22:05:28 +02:00
REDCODE 10337c735c feat: show visibility/deleted breakdown in album header in select mode 2026-07-15 21:59:27 +02:00
REDCODE e3d4cf9673 fix: update border colors and browse-mode visibility in AlbumDetail
- Private assets → red border (instead of orange)
- Protected assets → orange border
- Deleted assets → greyed out (opacity + grayscale)
- When not in select mode: hide Private and Deleted assets from view
2026-07-15 21:55:54 +02:00
REDCODE a203885377 Merge branch 'issue-78-album-detail-bulk-actions' into issue-78-role-visible-borders
Adds bulk delete, visibility modal, and rename Remove→Unlink to
AlbumDetail select mode, plus bugfix for missing Save() in bulk endpoints.
2026-07-15 21:48:18 +02:00
REDCODE fff5ea65df feat: add bulk delete and visibility change to AlbumDetail select mode
- Fix AssetController.BulkUpdate/BulkDelete — add missing Save() call
- Add BulkUpdateAssetsAsync and BulkDeleteAssetsAsync to AssetService
- Rename 'Remove N' → 'Unlink N' (removes from album, original behavior)
- Add 'Delete N' button — soft-deletes selected assets via BulkDelete
- Add 'Visibility' button — opens ModalFrame to pick Public/Protected/Private
- Apply calls BulkUpdateAssetsAsync with chosen visibility level
2026-07-15 21:46:28 +02:00
REDCODE 86f95d7461 feat: add role-visible colored borders on albums and assets based on item state (#78)
Backend:
- Add DeletedAt to AssetPreviewDto, AlbumAssetPreviewDto, AlbumPreviewDto
- Remove redundant DeletedAt from AssetDto (now inherited from base)
- Add viewerId parameter to ToAssetPreviewDto, ToAlbumPreviewDto,
  ToAlbumFullDto, ToPersonDetailedDto mappers
- Conditionally send DeletedAt only when viewer is Admin or asset uploader
- Pass uid/viewerId from all controller/repository call sites

Frontend:
- AlbumCard: show orange (not public) / red (deleted) border in select
  mode for admins/curators
- AlbumDetail: same border logic in GetTileClass for asset tiles
- Borders only appear in select mode per REDCODE's feedback
2026-07-15 20:48:00 +02:00
REDCODE ec287f087c docs: add visibility rules (R1–R7) to AGENTS.md 2026-07-15 20:32:23 +02:00
REDCODE 758696f7c9 fix: add entity-level visibility gating for albums and persons
Adds R3/R4 visibility gates to AlbumRepository.FindVisible and
PersonRepository.FindVisible so that 404 is returned when the
requesting user lacks permission to see the entity itself.

Adds comprehensive HTTP tests verifying:
- R2: anonymous asset detail access
- R3: Public/Protected visible to User, Private returns 404 (Admin sees all)
- R4: Private person returns 404 for User, 200 for Admin/Curator
2026-07-15 20:30:06 +02:00
REDCODE de9cd618b6 docs: fix stale column references and tooling versions in AGENTS.md
- Update dotnet-tools.json location reference
- Fix EF Core Tools version (both now v10.0.9)
- Remove stale SharedWith.Any() EF Core gotcha (per-user sharing removed)
- Fix index example to use Visibility/UploadedBy columns
2026-07-15 18:41:37 +02:00
REDCODE e7fb01be9f Merge pull request 'feat: frontend alignment for #106 auth redesign — Maintainer role, visibility UI, user data' (#127) from feature/106-auth-redesign-frontend into develop
Reviewed-on: #127
Reviewed-by: Samuele Lorefice <aironenerowork@gmail.com>
Reviewed-by: Fastwind <fastwind@noreply.localhost>
2026-07-15 16:23:17 +00:00
REDCODE e4a34a7dad fix: show maintained cosplayers section for all user types in user profile edit modal
- Remove _editAccessLevel == Maintainer guard so the maintainer
  assignment section appears when editing any user as admin
- OpenEditModal already loads maintained persons regardless of access level
2026-07-15 17:42:31 +02:00
REDCODE d799c3eb1f docs: clarify Curators and Admins can be maintainers for credited attribution
- Update Actors table: Curator and Admin entries mention maintainer assignment
- Update Role Design Philosophy: same clarification
- Update Curator section: note about PersonMaintainer as credit/attribution
- Update Admin section: same note
2026-07-15 17:40:49 +02:00
REDCODE c5fabf0e07 fix: show maintained cosplayers section for all user types in admin edit modal
- Remove _editAccessLevel == Maintainer guard from the maintained
  cosplayers markup so it appears for User, Curator, and Admin edits too
- Remove the same guard from OpenEditModal so maintained persons are
  loaded regardless of the user's current access level
2026-07-15 17:39:36 +02:00
REDCODE 3cdf9eb185 refactor: extract person search/assign UI into shared SearchAssignBadges component
- Create generic SearchAssignBadges component (TItem parameterized) with
  search input, dropdown results, and removable badge chips
- Replace duplicate markup in AdminUsers.razor, User.razor, PersonForm.razor
- Update RemoveAssignedPerson/RemoveMaintainer to accept the item DTO
  instead of Guid, aligning with the component's EventCallback<TItem> pattern
2026-07-15 17:33:26 +02:00
REDCODE 6efccae030 fix: address PR #127 review issues — fallback, eager load, indentation, Maintainer tests
- Change ?? EAccessLevel.Admin fallback to ?? EAccessLevel.User in UserController.GetAll
- Add .Include(u => u.MaintainedPersons) to UserRepository.GetAll() so MaintainedPersonIds/MaintainedPersonNames populate in list endpoint
- Fix UsersMapper.cs method body indentation (was flush with class)
- Add Maintainer-role visibility tests (68.5-68.8): promote user, test viewing admin, demote back
2026-07-15 17:31:33 +02:00
REDCODE 93cbbea3c7 fix: allow maintainer assignment for all user roles in UI
Remove _editAccessLevel == Maintainer guard so admins can assign
maintainers to curators/admins/users, not just Maintainer-level users.
2026-07-15 15:12:13 +02:00
REDCODE cace8640e9 fix: replace remaining jsonPath calls in asset visibility tests
Test 75 admin assertion: allow null email for server-scanned assets
(Guid.Empty placeholder has no email). Removes all remaining jsonPath
calls that could NPE on null resolved values.
2026-07-15 15:03:50 +02:00
REDCODE a3ce98a984 fix: replace jsonPath with response.body for null-value checks in visibility tests
jsonPath throws NullPointerException in GraalVM when the resolved JSON
value is null. Use response.body[n].property directly for all null
assertions in search-list and visibility tests.
2026-07-15 14:55:27 +02:00
REDCODE 4f3e3a28cc fix: enforce data visibility per access level with test coverage
- UsersMapper.ToGetUsersDto: filter Email, BannedAt, DeletedAt, AccessLevel,
  MaintainedPersonIds by viewer access (admin/self only)
- AssetsMapper.ToFullAssetsDto: pass viewerId to restrict UploadedBy.Email;
  null-safe Uploader fallback
- AssetsMapper.ToAssetPreviewDto: gate FileName behind Curator+ (was public)
- AlbumMapper: gate FileName behind Curator+; fix AssetCount to count only
  non-deleted assets
- AssetRepository.FindVisible: include Uploader to prevent NRE (500 error)
- AssetController: restrict UploadedBy reassignment to Admin only
- UserController: pass viewer context to all ToGetUsersDto calls
- WepApiTest.http: add 18 data visibility tests (#64-#81) verifying field
  gating per role; fix 3 pre-existing stale assertions; avoid jsonPath NPE
  on null values by using response.body directly
2026-07-15 14:53:39 +02:00
REDCODE 657ffaae11 fix: show email to self-viewing users on user page 2026-07-15 14:24:41 +02:00
REDCODE 700d5a63a7 chore: fix Dockerfiles, add debug compose to solution 2026-07-15 14:21:18 +02:00
REDCODE 9531ac2e23 fix: NRE on user page when user data not yet loaded
Add loading spinner and null-state guard to prevent rendering
before user data arrives. Fix unsafe `user is not {DeletedAt: null}`
pattern that throws NRE on null user.
2026-07-15 14:19:13 +02:00
REDCODE 288da412d9 fix: remove underline from maintainer links, load assigned person names in user edit modal 2026-07-15 14:11:57 +02:00
REDCODE 1b34520a66 feat: add docker-compose.debug.yml and UseWebAssemblyDebugging for WASM debugging
- Add docker-compose.debug.yml override for Debug build + Development env
- Add UseWebAssemblyDebugging() middleware in Development
- Production path unchanged (HSTS + HTTPS redirect preserved)
2026-07-15 14:10:25 +02:00
REDCODE 23b285cf49 fix: remove underline from user links, hide email from non-admin viewers 2026-07-15 13:18:32 +02:00
REDCODE 27707b120c feat: make usernames clickable on admin users page, linking to /User/{id} 2026-07-15 13:17:37 +02:00
REDCODE 14978087e3 feat: expand user page edit modal for admins with access level, maintainer assignment, and danger zone 2026-07-15 13:16:32 +02:00
REDCODE 3021788271 fix: null reference in User page maintainer display 2026-07-15 13:14:28 +02:00
REDCODE 358bf0918e feat: maintainer assignment UI for cosplayers, maintainer display on user page
Backend:
- Add MaintainerUserIds to PersonUpdateDto/PersonDetailedDto
- Add MaintainedPersonNames to UserInfoDto
- Add IPersonRepository.SetMaintainers + implementation
- PersonRepository.Find/FindVisible now include Maintainers
- PersonController.Update handles maintainer assignment (admin/curator)
- Fix PersonController.Update to save Visibility field
- Allow curators to list all users via UserController.GetAll

Frontend (PersonForm):
- Add maintainer search+select UI (admin/curator only in edit mode)
- Search users client-side, click to add, badge with X to remove
- Saves maintainer IDs on person update

Frontend (CosplayerDetail):
- Show 'Maintained by: user1, user2' in header with clickable links
- Pass maintainer data to PersonForm

Frontend (User page):
- Show 'Maintainer of: cosplayer1, cosplayer2' with links
- Non-admin view: strip Email, Created, Deleted fields
- Fix LoadUser to use route UserId instead of logged-in user
2026-07-15 13:11:05 +02:00
REDCODE 656784af00 feat: maintainer cosplayer assignment in admin user edit modal
Backend:
- Add MaintainedPersonIds to UserUpdateDto
- Add SetMaintainedPersons to user repository (removes old PersonMaintainer rows, inserts new)
- Wire up in UserController.Update (admin only)

Frontend:
- Add PersonService injection to AdminUsers page
- Searchable cosplayer dropdown in edit modal for Maintainer users
- Click result to add, badge with X to remove
- Zero debounce, saves only on Submit
- Pre-loads currently assigned cosplayer names on modal open
2026-07-15 12:55:03 +02:00
REDCODE c8b71f290b fix: add missing app.css link to index.html 2026-07-15 12:27:38 +02:00
REDCODE 8f109bf92f chore: commit compiled CSS for role badge classes 2026-07-15 12:19:46 +02:00
REDCODE 268b380867 refactor: move CanEdit logic to LoginService, remove local page properties 2026-07-15 12:18:53 +02:00
REDCODE 71889ddfac refactor: extract role checks to LoginService, update all consumers 2026-07-15 12:06:05 +02:00
REDCODE 0a74ff8770 refactor: generate access level dropdown from enum values 2026-07-15 12:04:35 +02:00
REDCODE f158181ccf refactor: extract role badge colors to SCSS theme layer 2026-07-15 12:04:01 +02:00
REDCODE e585abc378 feat: expand UI gating to include Maintainer with scope-aware CanEdit 2026-07-15 11:26:43 +02:00
REDCODE ccf16b6abc feat: add Protected Assets card to stats page 2026-07-15 11:25:05 +02:00
REDCODE 7dcb78db97 feat: add Visibility dropdown to album and person create/edit forms 2026-07-15 11:24:18 +02:00
REDCODE 26984f4452 feat: add Maintainer to admin user dropdowns and role badges 2026-07-15 11:23:15 +02:00
REDCODE f32d0678df feat: add MaintainedPersonIds to UserInfoDto with backend plumbing 2026-07-15 11:22:33 +02:00
REDCODE 05b99ab6c5 Merge pull request 'feat: #106 auth/permissions redesign — 5-actor model, #93 visibility levels (backend)' (#125) from feature/106-auth-redesign into develop
Reviewed-on: #125
Reviewed-by: Samuele Lorefice <aironenerowork@gmail.com>
Reviewed-by: Fastwind <fastwind@noreply.localhost>
2026-07-14 20:23:23 +00:00