Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • fusiondirectory fusiondirectory
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 33
    • Issues 33
    • List
    • Boards
    • Service Desk
    • Milestones
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • fusiondirectoryfusiondirectory
  • fusiondirectoryfusiondirectory
  • Issues
  • #5811
Closed
Open
Issue created Apr 04, 2018 by bmortier@bmortierMaintainer

UID can be changed from the API

Description

A user's UID can be changed via the API. This is not allowed in the GUI, and the API should reflect it.

Distribution Name and Version

Whatever is on demo.fusiondirectory.org

FusionDirectory Version

1.2

PHP version used

Whatever is on demo.fusiondirectory.org

Origin of php packages

Whatever is on demo.fusiondirectory.org

Steps to Reproduce

  1. use setfields() method in the API to set field 'uid'
  2. Observe user now has a new UID.

Expected behavior:

UID should not be changed, and FD should warn the user that changing the field is not allowed.

Actual behavior:

The UID of a user can be changed without warning (or error).

Reproduces how often:

100%

Additional Information

Example of JSON changing the uid of user uid=newuid,ou=people,dc=fusiondirectory,dc=org from 'newuid' (back) to 'user':

DEBUG:root:Posting this JSON:

{'params': ['aucqmpj43inps9e7e8elljc6r0', 'USER', 'uid=newuid,ou=people,dc=fusiondirectory,dc=org', 
  
  {'reference': 
    {'refs': None}, 
    'userRoles': {'groupsMembership': ['cn=ogroup-test,ou=groups,dc=fusiondirectory,dc=org']}, 
    'user': {'uid': 'user', 'base': 'dc=fusiondirectory,dc=org', 'givenName': 'antoine', 'description': 'Some description', 'cn': 'antoine foobar', 'sn': 'foobar', 'userPassword': '{SSHA}+fxT2utzO5JGkfgeHxIxdqQE3hTsUjtN'},
    'ldapDump': 
      {'dump': None}, 
    'personalInfo': 
      {'fdPhotoVisible': True, 'fdPrivateMail': ['private1@se.se', 'private2@se.se', 'private3@se.se', 'private4@se.se']}, 
    'posixAccount': {'gecos': 'antoine foobar', 'groupMembership': ['cn=posixgroup-test,ou=groups,dc=fusiondirectory,dc=org'], 'force_ids': False, 'gidNumber': 1103, 'homeDirectory': '/hjhj', 'loginShell': '/bin/ash', 'posixStatus': 'active', 'mustchangepassword': False, 'shadowLastChange': 17625, 'uidNumber': 1102, 'primaryGroup': 1103}
  }], 'id': '123', 'method': 'setfields'
}
Edited Apr 09, 2018 by bmortier
Assignee
Assign to
Time tracking