-
-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When handling data breaches we need to find the hexdigest of the attachment to ensure it gets purged from all caches / backups etc. Its quite hard to do this – even from the console – and any console commands are prone to error. Its easier to just show the associated attachments on the admin interface, along with some less user-friendly information that's useful for admin purposes.
- Loading branch information
1 parent
92ba759
commit 392a2da
Showing
3 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
app/views/admin_incoming_message/_foi_attachments.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<fieldset id="attachments" class="form-horizontal"> | ||
<legend>Attachments</legend> | ||
|
||
<% if foi_attachments.any? %> | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th>ID</th> | ||
<th>Filename</th> | ||
<th>Content Type</th> | ||
<th>Hexdigest</th> | ||
<th>Display Size</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<% foi_attachments.each do |attachment| %> | ||
<tr> | ||
<td><tt><%= attachment.id %></tt></td> | ||
<td><tt><%= attachment.filename %></tt></td> | ||
<td><tt><%= attachment.content_type %></tt></td> | ||
<td><tt><%= attachment.hexdigest %></tt></td> | ||
<td><tt><%= attachment.display_size %></tt></td> | ||
</tr> | ||
<% end %> | ||
</tbody> | ||
</table> | ||
<% else %> | ||
<p>No attachments.</p> | ||
<% end %> | ||
</fieldset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters