1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-06-11 13:48:13 +03:00

Attachments: Hid edit/delete controls where lacking permission

Added test to cover.
Also migrated related ajax-delete-row component to ts.

For #5323
This commit is contained in:
Dan Brown
2024-12-11 20:38:30 +00:00
parent 0ece664475
commit fcf0bf79a9
4 changed files with 74 additions and 22 deletions

View File

@ -8,20 +8,20 @@ export class Component {
/**
* The element that the component is registered upon.
* @type {Element}
* @type {HTMLElement}
*/
$el = null;
/**
* Mapping of referenced elements within the component.
* @type {Object<string, Element>}
* @type {Object<string, HTMLElement>}
*/
$refs = {};
/**
* Mapping of arrays of referenced elements within the component so multiple
* references, sharing the same name, can be fetched.
* @type {Object<string, Element[]>}
* @type {Object<string, HTMLElement[]>}
*/
$manyRefs = {};