workflows: add note if anonymisation is configured to unlink (#74430)
gitea/wcs/pipeline/head This commit looks good
Details
gitea/wcs/pipeline/head This commit looks good
Details
This commit is contained in:
parent
872ba53fc7
commit
fc9f80b41c
|
@ -1019,6 +1019,10 @@ def test_anonymise(pub):
|
|||
assert formdata.evolution[0].parts is None
|
||||
assert formdata.evolution[1].parts is None
|
||||
|
||||
assert item.render_as_line() == 'Anonymisation'
|
||||
item.unlink_user = True
|
||||
assert item.render_as_line() == 'Anonymisation (only user unlinking)'
|
||||
|
||||
|
||||
def test_anonymise_custom_view_user_filtered(pub):
|
||||
CardDef.wipe()
|
||||
|
|
|
@ -27,6 +27,10 @@ class AnonymiseWorkflowStatusItem(WorkflowStatusItem):
|
|||
category = 'formdata-action'
|
||||
unlink_user = False
|
||||
|
||||
def get_line_details(self):
|
||||
if self.unlink_user:
|
||||
return _('only user unlinking')
|
||||
|
||||
def perform(self, formdata):
|
||||
if self.unlink_user is True:
|
||||
if formdata.is_submitter(get_request().user):
|
||||
|
|
Loading…
Reference in New Issue