Add error notification when lacking the upload permission

This commit is contained in:
Oliver 2026-01-18 00:30:41 -07:00
parent 63f985aa0e
commit a5357a90a5
2 changed files with 10 additions and 1 deletions

View file

@ -69,6 +69,14 @@ export function DBConnectorMixin(HandlebarsApp) {
};
async isAbleToSave() {
if (!game.user.can(`FILES_UPLOAD`)) {
ui.notifications.error(
`TB.notifs.error.no-upload-permission`,
{ localize: true },
);
return false;
};
if (!this._docID) { return true };
const newLastModified = await lastModifiedAt(this.dbPath);