Skip to content

fix: add User Officer role endpoint and response#27

Merged
jekabs-karklins merged 1 commit intomasterfrom
add-user-officer-role
Feb 26, 2026
Merged

fix: add User Officer role endpoint and response#27
jekabs-karklins merged 1 commit intomasterfrom
add-user-officer-role

Conversation

@jekabs-karklins
Copy link
Contributor

Description

Add User Officer role endpoint and response

Motivation and Context

Required for the UserOfficeProject/user-office-core#1282 because the @Authorized decorator changes which will call getUserRoles and UserOfficer roles were not in the mockservice

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for a User Officer role endpoint (role ID 0) in the mock service to support authorization decorator changes in the main user-office-core repository. The changes ensure that when getUserRoles is called for user ID 0, the mock service returns the appropriate "User Officer" role.

Changes:

  • Added new JSON response file for role ID 0 with "User Officer" role
  • Registered /users-service/v1/role/0 endpoint in mockserver configuration
  • Minor whitespace cleanup (removed trailing spaces)

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/responses/user/getrolesforuser/0.json New response file containing User Officer role for role ID 0
src/mockserver.js Added /users-service/v1/role/0 endpoint registration and removed trailing whitespace

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@mutambaraf mutambaraf left a comment

Choose a reason for hiding this comment

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

LGTM

@jekabs-karklins jekabs-karklins merged commit 2cf5a70 into master Feb 26, 2026
4 checks passed
@jekabs-karklins jekabs-karklins deleted the add-user-officer-role branch February 26, 2026 16:13
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