Necmettin Karakaya
2020-07-19 00:33:27 +08:00
committed by GitHub
parent d5b5d4fc27
commit 24448c7504
6 changed files with 7 additions and 7 deletions

View File

@@ -31,7 +31,7 @@ const router = new Router();
router.post("documents.list", auth(), pagination(), async ctx => {
const { sort = "updatedAt", backlinkDocumentId, parentDocumentId } = ctx.body;
// collection and user are here for backwards compatablity
// collection and user are here for backwards compatibility
const collectionId = ctx.body.collectionId || ctx.body.collection;
const createdById = ctx.body.userId || ctx.body.user;
let direction = ctx.body.direction;

View File

@@ -490,7 +490,7 @@ Document.prototype.migrateVersion = function() {
};
// Note: This method marks the document and it's children as deleted
// in the database, it does not permanantly delete them OR remove
// in the database, it does not permanently delete them OR remove
// from the collection structure.
Document.prototype.deleteWithChildren = async function(options) {
// Helper to destroy all child documents for a document

View File

@@ -8,7 +8,7 @@ const { allow, cannot } = policy;
allow(User, "create", Document);
allow(User, ["read", "download"], Document, (user, document) => {
// existance of collection option is not required here to account for share tokens
// existence of collection option is not required here to account for share tokens
if (document.collection && cannot(user, "read", document.collection)) {
return false;
}
@@ -20,7 +20,7 @@ allow(User, ["share"], Document, (user, document) => {
if (document.archivedAt) return false;
if (document.deletedAt) return false;
// existance of collection option is not required here to account for share tokens
// existence of collection option is not required here to account for share tokens
if (document.collection && cannot(user, "read", document.collection)) {
return false;
}