Skip to content

Relax permissions for API list room endpoint - #3375

Merged
johannaengland merged 1 commit into
Uninett:5.13.xfrom
johannaengland:bugfix/room-list-api-permissions
May 15, 2025
Merged

johannaengland merged 1 commit into
Uninett:5.13.xfrom
johannaengland:bugfix/room-list-api-permissions

Conversation

@johannaengland

@johannaengland johannaengland commented May 14, 2025

Copy link
Copy Markdown
Contributor

Dependent on #3376.

Needed for room map widget. The frontend is using the room/ API endpoint.

This bug was introduced in c2b9002

@johannaengland
johannaengland requested review from hmpf and lunkwill42 May 14, 2025 14:11
@johannaengland johannaengland self-assigned this May 14, 2025
@johannaengland
johannaengland force-pushed the bugfix/room-list-api-permissions branch from 922388c to fc61d69 Compare May 14, 2025 14:12

@lunkwill42 lunkwill42 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would rather see RelaxedPermission extended to also require the request operation to be a one of the "safe" operations, rather than have custom permission switching code within each view.

DRF provides a IsAuthenticatedOrReadOnly permission which nearly fits the bill. I would want RelaxedPermission to be more like a IsAuthenticatedAndReadOnly. Perhaps even have it renamed to RelaxedReadPermission.

@johannaengland
johannaengland force-pushed the bugfix/room-list-api-permissions branch from fc61d69 to eae26c7 Compare May 15, 2025 09:06
@johannaengland
johannaengland force-pushed the bugfix/room-list-api-permissions branch from eae26c7 to 6456c2e Compare May 15, 2025 09:26
@johannaengland
johannaengland changed the base branch from 5.13.x to permissions/add-read-only-relaxed-permission May 15, 2025 09:26
@johannaengland
johannaengland requested a review from lunkwill42 May 15, 2025 09:26
hmpf
hmpf previously approved these changes May 15, 2025
@johannaengland
johannaengland force-pushed the permissions/add-read-only-relaxed-permission branch from 8e6a973 to 798a05d Compare May 15, 2025 11:06
@johannaengland
johannaengland deleted the branch Uninett:5.13.x May 15, 2025 11:14
@codecov

codecov Bot commented May 15, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (6c75212) to head (a6f8a4b).
Report is 2 commits behind head on 5.13.x.

Additional details and impacted files
@@      Coverage Diff       @@
##   5.13.x   #3375   +/-   ##
==============================
==============================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Needed for room map widget

This bug was introduced in c2b9002
@johannaengland
johannaengland force-pushed the bugfix/room-list-api-permissions branch from 6456c2e to a6f8a4b Compare May 15, 2025 11:17
@johannaengland
johannaengland changed the base branch from permissions/add-read-only-relaxed-permission to 5.13.x May 15, 2025 11:17
@johannaengland
johannaengland dismissed hmpf’s stale review May 15, 2025 11:17

The base branch was changed.

@johannaengland
johannaengland requested a review from hmpf May 15, 2025 11:17
@sonarqubecloud

Copy link
Copy Markdown

@johannaengland
johannaengland merged commit fdd8737 into Uninett:5.13.x May 15, 2025
@johannaengland
johannaengland deleted the bugfix/room-list-api-permissions branch May 15, 2025 11:27
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.

3 participants