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

ocs sharing api always returns an empty exact list while searching for a sharee #4265

Closed
SwikritiT opened this issue Jul 25, 2022 · 3 comments · Fixed by #6398
Closed

ocs sharing api always returns an empty exact list while searching for a sharee #4265

SwikritiT opened this issue Jul 25, 2022 · 3 comments · Fixed by #6398
Assignees
Labels

Comments

@SwikritiT
Copy link
Contributor

SwikritiT commented Jul 25, 2022

Describe the bug

OCS sharing API always returns an empty exact list while searching for a sharee

Steps to reproduce

Steps to reproduce the behavior:

  1. As admin create variations of user einstein like Einstein, Einstein_one, Einstein1
  2. Now search for string einstein
curl -vk -uadmin:admin https://host.docker.internal:9200/ocs/v1.php/apps/files_sharing/api/v1/sharees\?search\=einstein\&itemType\=file -H"OCS-APIREQUEST:1" | xmllint --format -

Expected behavior

Something like that of 0C10 where the exact match is shown in <exact> and other matches in <users>

curl -v -uadmin:admin http://localhost/core/ocs/v1.php/apps/files_sharing/api/v1/sharees\?search\=einstein\&itemType\=file -H"OCS-APIREQUEST:1" | xmllint --format - 
Response
<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message>OK</message>
    <totalitems/>
    <itemsperpage/>
  </meta>
  <data>
    <exact>
      <users>
        <element>
          <label>einstein</label>
          <value>
            <shareType>0</shareType>
            <shareWith>einstein</shareWith>
            <userType>0</userType>
          </value>
        </element>
      </users>
      <groups/>
      <remotes/>
    </exact>
    <users>
      <element>
        <label>Albert Einstein</label>
        <value>
          <shareType>0</shareType>
          <shareWith>Albert Einstein</shareWith>
          <userType>0</userType>
        </value>
      </element>
      <element>
        <label>einstein-einstein</label>
        <value>
          <shareType>0</shareType>
          <shareWith>einstein-einstein</shareWith>
          <userType>0</userType>
        </value>
      </element>
      <element>
        <label>einstein1</label>
        <value>
          <shareType>0</shareType>
          <shareWith>einstein1</shareWith>
          <userType>0</userType>
        </value>
      </element>
    </users>
    <groups/>
    <remotes/>
  </data>
</ocs>

Actual behavior

The exact list is always empty and all the matches are shown on the user list

curl -vk -uadmin:admin https://host.docker.internal:9200/ocs/v1.php/apps/files_sharing/api/v1/sharees\?search\=einstein\&itemType\=file -H"OCS-APIREQUEST:1" | xmllint --format -
Response
<?xml version="1.0" encoding="UTF-8"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message>OK</message>
  </meta>
  <data>
    <exact>
      <users/>
      <groups/>
      <remotes/>
    </exact>
    <users>
      <element>
        <label>Einstein one</label>
        <value>
          <shareType>0</shareType>
          <shareWith>Einstein1</shareWith>
          <shareWithAdditionalInfo>[email protected]</shareWithAdditionalInfo>
        </value>
      </element>
      <element>
        <label>Albert</label>
        <value>
          <shareType>0</shareType>
          <shareWith>Einstein_one</shareWith>
          <shareWithAdditionalInfo>[email protected]</shareWithAdditionalInfo>
        </value>
      </element>
      <element>
        <label>Albert Einstein</label>
        <value>
          <shareType>0</shareType>
          <shareWith>einstein</shareWith>
          <shareWithAdditionalInfo>[email protected]</shareWithAdditionalInfo>
        </value>
      </element>
    </users>
    <groups/>
    <remotes/>
  </data>
</ocs>

Setup

Please describe how you started the server and provide a list of relevant environment variables or configuration files.

OCIS_XXX=somevalue
OCIS_YYY=somevalue
PROXY_XXX=somevalue

Additional context

Add any other context about the problem here.

@SwikritiT
Copy link
Contributor Author

Also see this comment: #547 (comment)

@micbar micbar added the Priority:p3-medium Normal priority label Jul 26, 2022
@micbar micbar added this to the 2.0.0 General Availability milestone Jul 26, 2022
@micbar micbar modified the milestones: 2.0.0 General Availability, 2.1.0 Service Pack 1 Sep 14, 2022
@micbar micbar moved this to Prio 3 or less in Infinite Scale Team Board Dec 16, 2022
@amrita-shrestha
Copy link
Contributor

maybe this issue linked to issue #2376

@SwikritiT
Copy link
Contributor Author

maybe this issue linked to issue #2376

The format of the response is a little bit different now but true could be inter-related

@2403905 2403905 self-assigned this May 10, 2023
@2403905 2403905 moved this from Prio 3 or less to In progress in Infinite Scale Team Board May 10, 2023
@2403905 2403905 mentioned this issue May 26, 2023
9 tasks
@2403905 2403905 moved this from In progress to Needs Tests in Infinite Scale Team Board May 31, 2023
@github-project-automation github-project-automation bot moved this from Needs Tests to Done in Infinite Scale Team Board May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants