Skip to content

feat: add RoleDetail read-only view with affiliations, members, and moderators#1486

Open
herpaderpaldent wants to merge 1 commit into
web/feat/wayfinder-migrationfrom
web/feat/role-detail
Open

feat: add RoleDetail read-only view with affiliations, members, and moderators#1486
herpaderpaldent wants to merge 1 commit into
web/feat/wayfinder-migrationfrom
web/feat/role-detail

Conversation

@herpaderpaldent
Copy link
Copy Markdown
Contributor

Summary

Implements the RoleDetail page — a read-only detail view for ACL roles, showing:

  • Role metadata (name, type badge)
  • Affiliations — corporations/alliances/characters the role applies to, with affiliation type
  • Moderators — users who can moderate the role
  • Members — full membership list with status badge (active/inactive/pending)

Changes

Backend

  • ShowControlGroupController — eager-loads role_memberships.entity.main_character; now passes role.members (all user memberships with status/can_moderate/user) and role.moderators (users with can_moderate=true)
  • ShowControlGroupControllerTest — asserts role.members and role.moderators are present in the Inertia response

Frontend

  • resources/js/Pages/AccessControl/RoleDetail.vue — full read-only detail page (replaces 13-line stub)
    • Uses PageHeader, EntityByIdBlock, EntityBlock, EveImage from Shared
    • Wayfinder-generated routes for navigation

Depends on

PR #1485 (Wayfinder migration) must merge first.

…tors

ShowControlGroupController now passes role.members (all user memberships
with status + can_moderate flag) and role.moderators (users with
can_moderate=true) alongside the existing affiliations and permissions.

RoleDetail.vue replaces the 13-line stub with a full read-only detail
page:
- PageHeader with breadcrumb back to /acl and Edit button (can_edit)
- Role info card: name, type badge, description, permissions list
- Affiliations section: entity cards via EntityByIdBlock + affiliation_type badge
- Moderators section (when present): user cards with main_character
- Members section: user cards with status badge (active/inactive/pending)
  and Moderator badge for can_moderate members

ShowControlGroupControllerTest updated to assert role.members and
role.moderators are present in the Inertia response.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@what-the-diff
Copy link
Copy Markdown

what-the-diff Bot commented May 7, 2026

PR Summary

  • Improved Role Details Display: We've made major updates to the Role Detail view to make it more informative and easier to use. Now it's more structured and provides a better user experience. Users who have edit permissions can now also edit the PageHeader link directly.
  • Enhancements to Backend Operations: We've made changes in the backend process to gather more data which involves including role_memberships.entity.main_character for moderators and members. Also, the way we map user memberships has been updated, which now separates them into members and moderators for more clarity.
  • Advanced Unit Testing: To ensure the new added functionalities are performing as expected, we have updated our unit tests. These tests now also check whether the correct members and moderators arrays are included in the role objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant