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

fix readonly flag in texteditor #6787

Merged
merged 2 commits into from
Apr 14, 2022
Merged

fix readonly flag in texteditor #6787

merged 2 commits into from
Apr 14, 2022

Conversation

micbar
Copy link
Contributor

@micbar micbar commented Apr 14, 2022

Description

This fixes the readonly flag for the texteditor when the backend returns WebDAVPermissions W (FileUpdateable)

Related Issue

  • Occured during ocis Release

Motivation and Context

Make Single File Sharing in public links work

How Has This Been Tested?

  • Manually

Example Response (if appropriate):

<?xml version="1.0"?>
<d:multistatus xmlns:s="http://sabredav.org/ns" xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">
  <d:response>
    <d:href>/remote.php/dav/public-files/OWDoMgbKaUcKRAz/</d:href>
    <d:propstat>
      <d:prop>
        <oc:permissions/>
        <d:resourcetype>
          <d:collection/>
        </d:resourcetype>
        <oc:public-link-item-type>folder</oc:public-link-item-type>
        <oc:public-link-share-datetime>Thu, 14 Apr 2022 10:51:11 GMT</oc:public-link-share-datetime>
        <oc:public-link-share-owner>admin</oc:public-link-share-owner>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
    <d:propstat>
      <d:prop>
        <oc:favorite/>
        <oc:fileid/>
        <oc:owner-id/>
        <oc:owner-display-name/>
        <oc:share-types/>
        <oc:privatelink/>
        <d:getcontentlength/>
        <oc:size/>
        <d:getlastmodified/>
        <d:getetag/>
        <d:getcontenttype/>
        <oc:downloadURL/>
        <oc:public-link-permission/>
        <oc:public-link-expiration/>
        <oc:public-link-expiration/>
      </d:prop>
      <d:status>HTTP/1.1 404 Not Found</d:status>
    </d:propstat>
  </d:response>
  <d:response>
    <d:href>/remote.php/dav/public-files/OWDoMgbKaUcKRAz/README.md</d:href>
    <d:propstat>
      <d:prop>
        <oc:permissions>W</oc:permissions>
        <oc:fileid>ddc2004c-0977-11eb-9d3f-a793888cd0f8!70b8854e-fd5a-4332-ab35-f25150016408</oc:fileid>
        <oc:owner-id>admin</oc:owner-id>
        <oc:owner-display-name>Admin</oc:owner-display-name>
        <d:getcontentlength>306</d:getcontentlength>
        <oc:size>306</oc:size>
        <d:getlastmodified>Thu, 14 Apr 2022 10:37:44 GMT</d:getlastmodified>
        <d:getetag>"7717c93aa2851ad412874a04cc3c0773"</d:getetag>
        <d:getcontenttype>text/markdown</d:getcontenttype>
        <d:resourcetype/>
        <oc:downloadURL>https://localhost:9200/remote.php/dav/public-files/OWDoMgbKaUcKRAz/README.md</oc:downloadURL>
        <oc:public-link-item-type>file</oc:public-link-item-type>
        <oc:public-link-permission>3</oc:public-link-permission>
        <oc:public-link-share-datetime>Thu, 14 Apr 2022 10:51:11 GMT</oc:public-link-share-datetime>
        <oc:public-link-share-owner>admin</oc:public-link-share-owner>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
    <d:propstat>
      <d:prop>
        <oc:favorite/>
        <oc:share-types/>
        <oc:privatelink/>
        <oc:public-link-expiration/>
        <oc:public-link-expiration/>
      </d:prop>
      <d:status>HTTP/1.1 404 Not Found</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>

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 Apr 14, 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.

@micbar micbar changed the title fix readonly flag fo texteditor fix readonly flag in texteditor Apr 14, 2022
@ownclouders
Copy link
Contributor

Results for oCISFiles1 https://drone.owncloud.com/owncloud/web/24738/56/1

💥 The acceptance tests failed on retry. Please find the screenshots inside ...

webUITextEditor-textFile_feature-L21.png

webUITextEditor-textFile_feature-L21.png

webUITextEditor-textFile_feature-L29.png

webUITextEditor-textFile_feature-L29.png

webUITextEditor-textFile_feature-L50.png

webUITextEditor-textFile_feature-L50.png

webUITextEditor-textFile_feature-L80.png

webUITextEditor-textFile_feature-L80.png

webUITextEditor-textFile_feature-L81.png

webUITextEditor-textFile_feature-L81.png

webUITextEditor-textFile_feature-L82.png

webUITextEditor-textFile_feature-L82.png

webUITextEditor-textFile_feature-L83.png

webUITextEditor-textFile_feature-L83.png

webUITextEditor-textFile_feature-L84.png

webUITextEditor-textFile_feature-L84.png

💥 The acceptance tests pipeline failed. The build has been cancelled.

@sonarqubecloud
Copy link

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

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@fschade fschade merged commit 8fac709 into master Apr 14, 2022
@delete-merged-branch delete-merged-branch bot deleted the single-file-edit branch April 14, 2022 13:30
@micbar
Copy link
Contributor Author

micbar commented Apr 14, 2022

uups, we missed the changelog

@fschade
Copy link
Contributor

fschade commented Apr 14, 2022

uups, we missed the changelog

Does not have any direct user impact, in my opinion none is needed

@kulmann
Copy link
Member

kulmann commented Apr 14, 2022

uups, we missed the changelog

Does not have any direct user impact, in my opinion none is needed

I share that opinion. PR link could be included in an ocis changelog item that unlocks single file public links with edit permissions. Wouldn't do more than that regarding changelog.

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