Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable rename on shared resource #7390

Closed
wants to merge 5 commits into from
Closed

Enable rename on shared resource #7390

wants to merge 5 commits into from

Conversation

AlexAndBear
Copy link
Contributor

Description

Related Issue

Motivation and Context

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

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

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • ...

@update-docs
Copy link

update-docs bot commented Aug 2, 2022

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@@ -384,7 +385,7 @@ export function buildSharedResource(
}
resource.canDownload = () => parseInt(share.state) === ShareStatus.accepted
resource.canShare = () => SharePermissions.share.enabled(share.permissions)
resource.canRename = () => SharePermissions.update.enabled(share.permissions)
resource.canRename = () => true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kulmann I don't know if we can leave it this way, or we need a distinction between ocis and oc10

Comment on lines 233 to 238
if (file.isReceivedShare()) {
newPath = `${
context.getters.spaces.find((space) => space.driveAlias === 'virtual/shares')?.webDavPath
}/`
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kulmann I think this needs a sharingJail or spaces check?

@AlexAndBear
Copy link
Contributor Author

Problems:

  1. Rename doesn't check if name already exists, but fails if so
  2. In /files/spaces/shares/ old name is shown

@sonarcloud
Copy link

sonarcloud bot commented Aug 2, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

18.2% 18.2% Coverage
0.0% 0.0% Duplication

@AlexAndBear
Copy link
Contributor Author

Blocked by owncloud/ocis#4322

@AlexAndBear AlexAndBear closed this Oct 6, 2022
@kulmann kulmann deleted the issues/6899#2 branch November 3, 2022 14:28
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.

1 participant