Bug 50848 - SiSoPi import doesn't set ucsschoolPurgeTimestamp for "deleted" users
SiSoPi import doesn't set ucsschoolPurgeTimestamp for "deleted" users
Status: NEW
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS@school maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-02-21 15:09 CET by Valentin Heidelberger
Modified: 2020-03-31 12:21 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.057
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:
troeder: Patch_Available+


Attachments
missing set_deletion_grace() (1.05 KB, patch)
2020-03-27 07:01 CET, Daniel Tröder
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Valentin Heidelberger univentionstaff 2020-02-21 15:09:04 CET
In several domains using the SiSoPi importer I observe that it does not set the ucsschoolPurgeTimestamp for "deleted" users.

Not sure if this is related to bug 50406 but at least it's a blocker for the "top-level" issue of user deletion not working with SiSoPi as well.
Comment 1 Daniel Tröder univentionstaff 2020-02-24 09:54:31 CET
I don't think its related to Bug #50406, as that happens only when the script is called, not during the import.

Please provide the combined import configuration from the import logfile from  a domain where the ucsschoolPurgeTimestamp is not set.
Comment 3 Daniel Tröder univentionstaff 2020-03-27 07:01:09 CET
Created attachment 10332 [details]
missing set_deletion_grace()

I think this fixes it. Haven't tested it though.
Comment 4 Daniel Tröder univentionstaff 2020-03-30 11:00:04 CEST
I pushed the patch to a branch.

[dtroeder/50848_missing_ucsschoolPurgeTimestampin_SiSoPi eab291c98] Bug #50848: set deletion_grace_period / ucsschoolPurgeTimestamp in sisopi import
Comment 5 Valentin Heidelberger univentionstaff 2020-03-31 12:09:56 CEST
(In reply to Daniel Tröder from comment #3)
> Created attachment 10332 [details]
> missing set_deletion_grace()
> 
> I think this fixes it. Haven't tested it though.

I have tested it with the customer's import config and it works! ucsschoolPurgeTimestamp is being set correctly with it.

However user that have already been deactivated but do not have a ucsschoolPurgeTimestamp are not considered in a new import in which they're also missing. I have tested like so:

Import 1 / without patch / file contains user1, user2 and user3
Create:
user1
user2
user3

....

Import 2 / without patch / file contains user1 and user2
Modify:
user1
user2

Delete:
user3

....

Import 3 / with patch / file contains user1 and user2
Modify:
user1
user2

-> user3 is not considered so it just remains without a PurgeTimestamp

IMHO we'd need some way to set the PurgeTimestamp for users that have already been deactivated and thus won't be considered in another import in which they're also missing.
Comment 6 Valentin Heidelberger univentionstaff 2020-03-31 12:21:39 CEST
(In reply to Valentin Heidelberger from comment #5)
> (In reply to Daniel Tröder from comment #3)
> > Created attachment 10332 [details]
> > missing set_deletion_grace()
> > 
> > I think this fixes it. Haven't tested it though.
> 
> I have tested it with the customer's import config and it works!
> ucsschoolPurgeTimestamp is being set correctly with it.
> 
> However user that have already been deactivated but do not have a
> ucsschoolPurgeTimestamp are not considered in a new import in which they're
> also missing. I have tested like so:
> 
> Import 1 / without patch / file contains user1, user2 and user3
> Create:
> user1
> user2
> user3
> 
> ....
> 
> Import 2 / without patch / file contains user1 and user2
> Modify:
> user1
> user2
> 
> Delete:
> user3
> 
> ....
> 
> Import 3 / with patch / file contains user1 and user2
> Modify:
> user1
> user2
> 
> -> user3 is not considered so it just remains without a PurgeTimestamp
> 
> IMHO we'd need some way to set the PurgeTimestamp for users that have
> already been deactivated and thus won't be considered in another import in
> which they're also missing.

Such (student) users can be found like so for example:

univention-ldapsearch -LLL "(&(objectClass=ucsschoolStudent)(shadowExpire=1)(!(ucsschoolPurgeTimestamp=*)))" dn