Class DeletionAttribution
java.lang.Object
io.jenkins.plugins.batchcontrol.security.DeletionAttribution
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public final class DeletionAttribution
extends Object
Who deleted an item (SPEC 6: the history names who did what). Core's
AbstractItem.delete()
deletes the items below a folder as SYSTEM, on the thread deleting the folder, so the current
authentication names SYSTEM for each of them. The user who started the folder's deletion is
remembered from onCheckDelete (remember(hudson.model.Item)) and named for the items below it
(deletingUser(hudson.model.Item)) while the folder is registered as being deleted
(ItemDeletion.isRegistered(hudson.model.Item)). A deletion genuinely started by SYSTEM stays SYSTEM.
WindowItemListener keeps the entries: it remembers in onCheckDelete and forgets
in onDeleted, and its ordinal runs it after every other item listener, so any listener
may ask deletingUser(hudson.model.Item) from its own onDeleted.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringdeletingUser(Item item) Who deleteditem: the current user, or, when core deletes it as SYSTEM because a folder above it is being deleted on this thread, the user who started that folder's deletion.
-
Method Details
-
deletingUser
Who deleteditem: the current user, or, when core deletes it as SYSTEM because a folder above it is being deleted on this thread, the user who started that folder's deletion. Valid from anonDeletedlistener.
-