Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • fusiondirectory-plugins fusiondirectory-plugins
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 65
    • Issues 65
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • fusiondirectoryfusiondirectory
  • fusiondirectory-pluginsfusiondirectory-plugins
  • Issues
  • #6171
Closed
Open
Issue created 2 years ago by dockx thibault@tdockxDeveloper
  • New related issue

  • New related issue

[webservice] - supannCMSId et supannCMSAppId - Attributes filtering issue

Closed

[webservice] - supannCMSId et supannCMSAppId - Attributes filtering issue

Description

It seems the output during a filtering on supannCMS components do not work whil using the webservice.

Distribution Name and Version

Debian 11

FusionDirectory Version

1.4

Plugin with the defect

Webservice

PHP version used

7.4

Origin of php packages

Enterprise

Steps to Reproduce

CURL command can be use. Client command here enclosed :

GET /objects/user?base=ou=active,dc=int-evry,dc=fr&filter=(uid=test)&attrs\[supannCMSAppId\]=\*&attrs\[supannCMSId\]=\*&attrs\[supannCMSAppAffectation\]=\*

Expected behavior:

A proper output if filter and attributes arguments are used.

Actual behavior:

  • if attrs[supannCMSAppId]=*, nothing happens.
  • if attrs[supannCMSAppId;x-koha-xmsb]=*, ACL issue is generated.

Reproduces how often:

100%.

Additional Information

Important to see if REST tools can be used to reproduce the problem. Curl script from the team does not report any issue apart from void data displayed.

Tasks

0
Cannot read properties of undefined (reading 'workItem')

Linked items
...

    Related merge requests

    Activity


    • dockx thibault changed due date to June 02, 2022 2 years ago

      changed due date to June 02, 2022

    • dockx thibault changed milestone to %FusionDirectory 1.4 2 years ago

      changed milestone to %FusionDirectory 1.4

    • dockx thibault assigned to @tdockx 2 years ago

      assigned to @tdockx

    • dockx thibault
      dockx thibault @tdockx · 2 years ago
      Author Developer

      I could indeed reproduce the issue.

      For supannCMSAppID attributes equals to all

      http://localhost/fusiondirectory/rest.php/v1/objects/user/?base=ou%3Dpeople,dc%3Dhome&filter=(uid%3Djonathan)&attrs%5BsupannCMSAppId%5D=*

      Only : {} is returned.

      ForsupannCMSAppId;x-koha-xmsb attributes equals to all

      http://localhost/fusiondirectory/rest.php/v1/objects/user/?base=ou%3Dpeople,dc%3Dhome&filter=(uid%3Djonathan)&attrs%5BsupannCMSAppId%3Bx-koha-xmsb%5D=*

      The following is being returned.

      [
      	{
      		"class": "FusionDirectoryException",
      		"message": "Could not find ACL for attribute \"supannCMSAppId;x-koha-xmsb\" for type \"user\"",
      		"line": 95,
      		"file": "/usr/share/fusiondirectory/include/class_objects.inc"
      	}
      ]
      Edited 2 years ago by dockx thibault
    • dockx thibault
      dockx thibault @tdockx · 2 years ago
      Author Developer

      Hello @bmortier @jswaelens,

      Is it possible that FD ACL does not work with LDAP options ?

      A quick and dirty fix on the object class (class_objects.inc) Adding line 93:

      $search_attr = str_replace(';x-koha-xmsb', '', $search_attr);

      This makes webservice happy and showing the proper data.

      From:

      [
      	{
      		"class": "FusionDirectoryException",
      		"message": "Could not find ACL for attribute \"supannCMSAppId;x-koha-xmsb\" for type \"user\"",
      		"line": 96,
      		"file": "/usr/share/fusiondirectory/include/class_objects.inc"
      	}
      ]

      To:

      {
      	"uid=jonathan,ou=people,dc=home": {
      		"supannCMSAppId;x-koha-xmsb": [
      			"1"
      		]
      	}
      }

      EDIT 1 : LDAP options are indeed not being taken into account by ACL, a new verification function to remove ldap options during ACL check will be implemented. (Testing to verify impact on registration must be performed after).

      Edited 2 years ago by dockx thibault
    • dockx thibault created branch 6171-webservice-supanncmsid-et-supanncmsappid-attributes-filtering-issue to address this issue 2 years ago

      created branch 6171-webservice-supanncmsid-et-supanncmsappid-attributes-filtering-issue to address this issue

    • dockx thibault
      dockx thibault @tdockx · 2 years ago
      Author Developer

      Note : closing this issue as following one was created within core.

    • dockx thibault closed 2 years ago

      closed

    • dockx thibault reopened 2 years ago

      reopened

    • dockx thibault added 3h of time spent 2 years ago

      added 3h of time spent

    • dockx thibault closed 2 years ago

      closed

    • dockx thibault added PJ2203-0467 label 2 years ago

      added PJ2203-0467 label

    • dockx thibault added fusiondirectory-core label 2 years ago

      added fusiondirectory-core label

    • dockx thibault added won't fix label 2 years ago

      added won't fix label

    • bmortier added telecom sud paris label 8 months ago

      added telecom sud paris label

    Please register or sign in to reply
    Assignee
    dockx thibault's avatar
    dockx thibault
    Assign to
    Labels
    4
    Changed PJ1802-0188 enhancement plugin-mail
    4
    Changed PJ1802-0188 enhancement plugin-mail
      Assign labels
    • Manage project labels

    Milestone
    FusionDirectory 1.4
    FusionDirectory 1.4 (expired)
    Due date
    None
    None
    5h 40m / --
    Time tracking
    Spent: 5h 40m
    Time tracking report
    Confidentiality
    Not confidential
    Not confidential

    You are going to turn on confidentiality. Only project members with at least the Reporter role, the author, and assignees can view or be notified about this issue.

    Lock issue
    Unlocked
    0
    0 Participants
    Reference: fusiondirectory/fd-plugins#3360