Fix #4990: Allow admins to delete uploads.

Allow admins to delete media asset files.

This only deletes the image file itself, not the upload or media asset record. The upload will still
be in the user's upload list, but the image will be gone. The media asset page will still exist, but
it will only show the file's metadata, not the image itself. We don't delete the metadata so we have
a record of what the file's MD5 was and who uploaded it, to prevent the file from being uploaded
again and to take action against the user if necessary.
This commit is contained in:
evazion
2022-11-29 18:09:25 -06:00
parent 695568e08b
commit 756362f89e
11 changed files with 83 additions and 13 deletions

View File

@@ -119,6 +119,9 @@ html, body[data-current-user-theme="light"] {
--success-color: var(--green-5);
--error-color: var(--red-5);
--success-hover-color: var(--green-4);
--error-hover-color: var(--red-4);
--error-background-color: var(--red-1);
--success-background-color: var(--green-0);
--target-background: var(--yellow-0);
@@ -342,8 +345,11 @@ html, body[data-current-user-theme="light"] {
--link-color: var(--azure-4);
--link-hover-color: var(--azure-3);
--success-color: var(--green-3);
--error-color: var(--red-3);
--success-color: var(--green-4);
--error-color: var(--red-4);
--success-hover-color: var(--green-3);
--error-hover-color: var(--red-3);
--default-border-color: var(--grey-7);

View File

@@ -252,8 +252,13 @@ $spacer: 0.25rem; /* 4px */
.link-color { color: var(--link-color); }
.text-success { color: var(--success-color); }
.text-error { color: var(--error-color); }
.text-success { color: var(--success-color) !important; }
.text-error { color: var(--error-color) !important; }
.text-danger { color: var(--error-color) !important; }
a.text-success:hover { color: var(--success-hover-color) !important; }
a.text-error:hover { color: var(--error-hover-color) !important; }
a.text-danger:hover { color: var(--error-hover-color) !important; }
.transition-opacity {
transition: opacity 0.15s ease;