owncloud / data_exporter

Export/Import for ownCloud user data
GNU General Public License v2.0
7 stars 5 forks source link

Update LastLoginTimestamp when importing for a new user #236

Closed phil-davis closed 11 months ago

phil-davis commented 11 months ago

Description

Set the LastLoginTimestamp when a user is created for an import. That prevents later code from executing "first time login" actions for the user when they next log in. The importer already does the needed stuff to set up the user's file system etc. We don't want later code to do "bonus" stuff, like copying in the skeleton.

A test scenario has been added to cover importing when a skeleton dir is defined on the system. While doing that, I also improved the test code - it was not actually deleting imported users at the end of the scenario, and the simpleExport/userfoo fixture was missing a shares.jsonl file, which was causing the import to report a problem (but the files were being imported, so the existing tests were passing)

Related Issue

Fixes #234

How Has This Been Tested?

Manually rerun the sequence in the issue and observe that the skeleton files have not been accidentally added to the user's files.

Types of changes

Checklist:

sonarcloud[bot] commented 11 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

phil-davis commented 11 months ago

This should be documented somewhere.

See doc PR https://github.com/owncloud/docs-server/pull/1052

phil-davis commented 11 months ago

@jnweiger if you have a release branch in progress, then please cherry-pick (or however you want to do it) this into the release branch.

jnweiger commented 11 months ago

Thanks @phil-davis - merged into release-0.3.0