Add error notification when lacking the upload permission
This commit is contained in:
parent
63f985aa0e
commit
a5357a90a5
2 changed files with 10 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue