Prevent items in group libraries from being added to My Publications

And remove existing group items that have been added
This commit is contained in:
Dan Stillman 2017-05-04 21:18:44 -04:00
parent 3561864542
commit 2eef1702e0
5 changed files with 35 additions and 24 deletions

View file

@ -376,6 +376,15 @@ describe("Zotero.Item", function () {
assert.ok(e);
assert.include(e.message, "Linked-file attachments cannot be added to My Publications");
});
it("should be invalid for group library items", function* () {
var group = yield getGroup();
var item = yield createDataObject('item', { libraryID: group.libraryID });
item.inPublications = true;
var e = yield getPromiseError(item.saveTx());
assert.ok(e);
assert.equal(e.message, "Only items in user libraries can be added to My Publications");
});
});
describe("#parentID", function () {