Skip to content

debt(dwr): replacing PermissionAjax with rest endpoint#34799

Closed
wezell wants to merge 6 commits intomainfrom
issue-34797-dwr-to-rest
Closed

debt(dwr): replacing PermissionAjax with rest endpoint#34799
wezell wants to merge 6 commits intomainfrom
issue-34797-dwr-to-rest

Conversation

@wezell
Copy link
Copy Markdown
Member

@wezell wezell commented Feb 27, 2026

Prompt log: https://gist.github.com/wezell/c4b5f7f20e780e9ebe7f35a68c954ebc

Summary

  • Replaces PermissionAjax DWR calls with a new REST endpoint (/api/v1/permissions)
  • Migrates all JSP frontend callers from DWR proxy to fetch() calls against the new JAX-RS resource
  • Deprecates PermissionAjax and several other unused DWR classes (HostAjax, InodeAjax, CategoryAjax, PermissionableObjectDWR)
  • Removes DWR script includes that are no longer needed

Changes

  • New: PermissionResource.java — REST endpoint for permission operations (get permissionable, get permissions, save permissions, reset permissions)
  • New: PermissionableObjectView.java, AssetPermissionHelper enhancements
  • Updated: 12 JSP files migrated from PermissionAjax DWR to REST fetch calls
  • Updated: dwr.xml — removed unused DWR class mappings
  • Updated: OpenAPI spec with new permission endpoints

Test Plan

  • Verify permission tab loads correctly on content types, containers, templates, folders, hosts
  • Verify saving/resetting permissions works via the new REST endpoints
  • Verify categories permissions dialog works
  • Verify browser view permission checks still function

Ref: #34797

🤖 Generated with Claude Code

@github-actions github-actions bot mentioned this pull request Feb 27, 2026
4 tasks
@github-actions github-actions bot added the Area : Backend PR changes Java/Maven backend code label Feb 27, 2026
…ndpoint

Adds 31 new integration tests covering the previously untested endpoints:
GET /{assetId}, PUT /role/{roleId}/asset/{assetId}, PUT /{assetId}/_individualpermission,
GET /{assetId}/_permissionable, GET /_bypermissiontype, and GET /_bycontent.
Includes security boundary, pagination, roundtrip, and error case coverage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wezell wezell linked an issue Feb 27, 2026 that may be closed by this pull request
4 tasks
wezell and others added 4 commits February 27, 2026 11:00
- Add Category to AssetPermissionHelper.resolveAsset() chain so category
  inodes are recognized as permissionable assets
- Add inheritedFromType/Path/Id fields to RolePermissionView so the
  "Getting permissions from parent:" label renders correctly
- Guard initPermission() in view_categories.jsp against undefined asset ID

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Mar 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

This PR was closed because it has been stalled with no activity.

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

Labels

Area : Backend PR changes Java/Maven backend code stale

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

DWR modernization

1 participant