Skip to content

Conversation

@blizzz
Copy link
Member

@blizzz blizzz commented Dec 18, 2018

  • a background job checks whether known LDAP users are still present. If not they are flagged as "deleted". Which was not recorded, was the date of the detection. This information is now recorded. (As a another db row in the preferences as the IConfig API only allows to request users for a precise value).
  • For output a column/field "Detected on" to the ldap:show-remnants command was added.
  • Also added was a --short-date flag to display it in "Y-m-d" format which is easier to consume for scripts that may react on it. For users that were detected earlier, the value "unknown" is shown instead.

How to test?

  1. Have LDAP configured
  2. Log in with one of the LDAP users.
  3. Delete this user in LDAP
  4. Manually check the existance of it per occ ldap:check-user $uid (beware caching)
  5. Assert occ ldap:show-remnants shows this user as deleted, with a readable long time format
  6. Assert occ ldap:show-remnants --short-date shows this user as deleted, with Y-m-d formatted date

@blizzz
Copy link
Member Author

blizzz commented Dec 18, 2018

/backport to stable15

@blizzz
Copy link
Member Author

blizzz commented Dec 18, 2018

/backport to stable14

Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐘

@skjnldsv
Copy link
Member

We really need to create a all-in-one docker for ldap instead of the weird thing we have from the owncloud documentation :)

as they are interact with the DB they are more integraiton than unit tests

Signed-off-by: Arthur Schiwon <[email protected]>
@blizzz blizzz force-pushed the enhancement/noid/ldap-remnants-detected-field branch from af95dc4 to 85f14bc Compare December 21, 2018 16:24
@blizzz
Copy link
Member Author

blizzz commented Dec 21, 2018

rebased for CI

Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍

@MorrisJobke
Copy link
Member

1) OCA\User_LDAP\Tests\User\DeletedUsersIndexTest::testMarkAndFetchUser
Failed asserting that true is false.

/drone/src/github.com/nextcloud/server/apps/user_ldap/tests/User/DeletedUsersIndexTest.php:75

@MorrisJobke MorrisJobke added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Jan 4, 2019
@MorrisJobke MorrisJobke merged commit c1ddd2f into master Jan 4, 2019
@MorrisJobke MorrisJobke deleted the enhancement/noid/ldap-remnants-detected-field branch January 4, 2019 21:48
@backportbot-nextcloud
Copy link

backport to stable15 in #13372

@backportbot-nextcloud
Copy link

backport to stable14 in #13373

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish enhancement feature: ldap

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants