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

Different response containing exact and non exact match in response of getting sharees #2376

Closed
jasson99 opened this issue Aug 10, 2021 · 4 comments
Labels

Comments

@jasson99
Copy link
Contributor

Describe the bug

When we get the sharees, the response in OC10 and OCIS is different.

Steps to reproduce

Steps to reproduce the behavior:

  1. Create users Alice and Sharee1
  2. Create group shareeGroup and shareeGroup2
  3. Add user Alice to group shareeGroup2
  4. As user Alice get the sharees with search value Sharee1 and itemType file as follows:
curl -X GET http://localhost:20080/ocs/v1.php/apps/files_sharing/api/v1/sharees\?search\=Sharee1\&itemType\=file -H OCS_APIREQUEST=true -u Alice:123456 | xmllint --format -

Expected behavior

The response in OC10 is as follows:

curl -X GET http://172.17.0.1/oc/ocs/v1.php/apps/files_sharing/api/v1/sharees\?search\=Sharee1\&itemType\=file -H OCS_APIREQUEST=true -u Alice:123456 -v;

< HTTP/1.1 200 OK
<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message>OK</message>
  <totalitems></totalitems>
  <itemsperpage></itemsperpage>
 </meta>
 <data>
  <exact>
   <users>
    <element>
     <label>Sharee One</label>
     <value>
      <shareType>0</shareType>
      <shareWith>sharee1</shareWith>
      <userType>0</userType>
     </value>
    </element>
   </users>
   <groups/>
   <remotes/>
  </exact>
  <users/>
  <groups/>
  <remotes/>
 </data>
</ocs>

Actual behavior

The response in OCIS is as follows:

curl -X GET http://localhost:20080/ocs/v1.php/apps/files_sharing/api/v1/sharees\?search\=Sharee1\&itemType\=file -H OCS_APIREQUEST=true -u Alice:123456 | xmllint --format -

<?xml version="1.0" encoding="UTF-8"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message>OK</message>
  </meta>
  <data>
    <exact/>
    <users>
      <label>Sharee One</label>
      <value>
        <shareType>0</shareType>
        <shareWith>sharee1</shareWith>
        <shareWithAdditionalInfo>sharee1@example.org</shareWithAdditionalInfo>
      </value>
    </users>
  </data>
</ocs>

Additional context

Add any other context about the problem here.

@phil-davis
Copy link
Contributor

phil-davis commented Aug 10, 2021

Summary: in oC10 the exact match of the user sharee1 comes inside the <exact> section.
In oCIS it comes outside the <exact> section.

@phil-davis
Copy link
Contributor

@jasson99 what happens if you search for sharee1 (lowercase of the user name)?

Maybe oC10 and oCIS behave the same for that search?

@jasson99
Copy link
Contributor Author

@jasson99 what happens if you search for sharee1 (lowercase of the user name)?

Maybe oC10 and oCIS behave the same for that search?

Yes, the response is same with upper and lowercase search.

@ScharfViktor
Copy link
Contributor

OCS is deprecated and won't fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants