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 50
    • Issues 50
    • 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
  • #5166
Closed
Open
Issue created Sep 29, 2016 by mhamant@mhamantReporter

Add a webservice method to add a value to multi-valuated attributes

Yesterday, I tested adding a member to an existing group. I used the following code:

$fdresult = $client->getfields($session_id, 'ogroup', 'cn=zfezfez,ou=groups,dc=xxx,dc=xxx');
$group_members = $fdresult['sections']['members']['attrs']['member']['value'];
$group_members[] = 'uid=newmember,ou=people,dc=xxx,dc=xxx';
$gdata['ogroup']['member']['value'] = $group_members;
$fdresult = $client->setfields($session_id, 'ogroup', 'cn=zfezfez,ou=groups,dc=xxx,dc=xxx', $gdata);

My concern with the above is the current system force you to retrieve the full object, add the entry to it and and send it back to the webservice.

Abviously, a better implementation would be to provide the ability to simply add a value without transmitting all the data, and get a error message in the value already exists for example. It's how you would do it with a LDIF file by the way.

The same is suggested for delete operations.

Cheers,

  • Relations:
    • relates fd#5302
Edited Dec 08, 2017 by bmortier
Assignee
Assign to
Time tracking