Skip to content

Conversation

@LukasHirt
Copy link
Collaborator

@LukasHirt LukasHirt commented Oct 16, 2025

Description

When managing spaces via claims, we were disabling sharing of resources when the server managed spaces capability was enabled. This was not correct, as we should only disable sharing of spaces.

Motivation and Context

The capability should affect only spaces.

How Has This Been Tested?

  • test environment: macos, chrome
  • test case 1: set OCIS_CLAIM_MANAGED_SPACES_ENABLED to true and try to share a resource
  • test case 2: set OCIS_CLAIM_MANAGED_SPACES_ENABLED to true and try to add members into a space
  • test case 3: set OCIS_CLAIM_MANAGED_SPACES_ENABLED to false and try to share a resource
  • test case 4: set OCIS_CLAIM_MANAGED_SPACES_ENABLED to false and try to add members into a space

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests
  • Documentation
  • Maintenance (e.g. dependency updates or tooling)

…spaces via claims

When managing spaces via claims, we were disabling sharing of resources
when the server managed spaces capability was enabled. This was not
correct, as we should only disable sharing of spaces.
@LukasHirt LukasHirt requested review from Copilot and mzner October 16, 2025 17:09
@LukasHirt LukasHirt self-assigned this Oct 16, 2025
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 fixes a bug where sharing of all resources was incorrectly disabled when server-managed spaces capability was enabled. The fix ensures that only space resources have sharing disabled under this capability, while regular resources remain shareable.

Key changes:

  • Moved the server-managed spaces check to only apply to space resources
  • Added comprehensive test coverage for the corrected behavior

Reviewed Changes

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

File Description
packages/web-pkg/src/composables/shares/useCanShare.ts Refactored logic to check for server-managed spaces only when the resource is a space type
packages/web-pkg/tests/unit/composables/shares/useCanShare.spec.ts Added test suite covering space and non-space resource sharing scenarios with server-managed spaces enabled/disabled
changelog/unreleased/bugfix-do-not-disable-sharing-of-resources-when-managing-spaces-via-claims.md Documented the bugfix for the changelog

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@LukasHirt LukasHirt enabled auto-merge October 16, 2025 17:09
@sonarqubecloud
Copy link

@LukasHirt LukasHirt merged commit 9b51f1b into master Oct 17, 2025
4 checks passed
@LukasHirt LukasHirt deleted the fix/oidc-managed-resources branch October 17, 2025 05:59
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