Skip to content

Conversation

@HasiniSama
Copy link
Contributor

@HasiniSama HasiniSama commented Jul 9, 2025

Purpose

Issue: wso2/product-is#21100

Ported the implementation from: #906

Additional changes introduced:

  • Update the /share GET API to return the sharingInitiationMode.
  • /share POST API requests now doesn't require the complete hierarchy to be sent in the payload. However the application should be already shared with the parent org.
  • Fixed the bug on getting the roles shared overridden by the parent's roles shared.
  • If shareWithAllChildren property is set to true, it will be treated same as the ALL_EXISTING_AND_FUTURE_ORGS and the sharingInitiationMode will be sent in the GET API.
  • An application cannot be unshared from a child organization if there's parent organization that enforces a future policy.
  • Fixed the error in the PATCH API when having both add/remove share for a single organization.
  • sharingInitiationMode is only included if it's sent in the 'attributes' query param.
  • Update the roles list limit returned in GET API to 100.
  • Fix the pagination bug on href link.

Related PR(s)

[Merge after] wso2-extensions/identity-organization-management#525

@HasiniSama HasiniSama changed the title Selective Role Sharing Provide API support for selective role sharing with application sharing Jul 9, 2025
@AnuradhaSK AnuradhaSK requested a review from Copilot July 9, 2025 11:18
Copy link
Contributor

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

Enables selective and bulk application sharing APIs with pagination and sharing initiation metadata.

  • Adds new POST, PATCH, and pagination-enabled GET endpoints for application sharing and unsharing.
  • Enhances /share GET to return sharingInitiationMode and cursor‐based before/after pagination.
  • Implements core service methods for selective, all, and incremental sharing operations.

Reviewed Changes

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

Show a summary per file
File Description
applications.yaml Defines new share/unshare endpoints, parameters, and response schemas with pagination and initiation mode
ApplicationsApiServiceImpl.java Exposes new delegate methods for share-with-all, share-selected, unshare, and patch sharing
ServerApplicationSharingService.java Implements business logic for selective and bulk share/unshare operations, builds paginated responses
ApplicationManagementEndpointConstants.java Introduces constants for query params, link rels, and async status
BasicOrganizationResponse.java Extends response model with parentId, hasChildren, depthFromRoot, sharingInitiationMode, and roles

HasiniSama and others added 2 commits July 22, 2025 17:17
…agement/org.wso2.carbon.identity.api.server.application.management.v1/src/main/java/org/wso2/carbon/identity/api/server/application/management/v1/core/ServerApplicationSharingService.java

Co-authored-by: Sahan Dilshan  <[email protected]>
@jenkins-is-staging
Copy link

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/16444342014
Status: success

Copy link

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

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

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/16444342014

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.

4 participants