mirror of
https://github.com/outline/outline.git
synced 2026-11-25 07:04:37 +03:00
test
This commit is contained in:
1 parent
ea3f0b12c8
commit
2e17d0c185
1 file changed
+7
-3
@@ -149,12 +149,16 @@ allow(User, "share", Document, (user, document) => {
|
||||
document.collection,
|
||||
"collection is missing, did you forget to include in the query scope?"
|
||||
);
|
||||
if (can(user, "share", document.collection)) {
|
||||
return true;
|
||||
if (cannot(user, "share", document.collection)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return user.id === document.createdById;
|
||||
if (document.isDraft) {
|
||||
return user.id === document.createdById;
|
||||
}
|
||||
|
||||
return user.teamId === document.teamId;
|
||||
});
|
||||
|
||||
allow(User, "update", Document, (user, document) => {
|
||||
|
||||
Reference in new issue
Block a user