mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-11 20:27:39 +02:00
feat: add validation for teams and organization
This commit is contained in:
@@ -38,7 +38,16 @@ exports.up = async Parse => {
|
||||
.addBoolean('HeaderDocId')
|
||||
.addPointer('CreatedBy', '_User')
|
||||
.addString('Webhook')
|
||||
.addBoolean('ShareWithTeam', false);
|
||||
.addBoolean('ShareWithTeam', false)
|
||||
.setCLP({
|
||||
get: {},
|
||||
find: {},
|
||||
count: {},
|
||||
create: { '*': true },
|
||||
update: { '*': true },
|
||||
delete: {},
|
||||
addField: {},
|
||||
});
|
||||
await extUsers.save(null, { useMasterKey: true });
|
||||
|
||||
const doc = new Parse.Schema('contracts_Document');
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
*
|
||||
* @param {Parse} Parse
|
||||
*/
|
||||
exports.up = async Parse => {
|
||||
const teamSchema = new Parse.Schema('contracts_Teams');
|
||||
teamSchema.setCLP({
|
||||
get: {},
|
||||
find: {},
|
||||
count: {},
|
||||
create: {},
|
||||
update: {},
|
||||
delete: {},
|
||||
addField: {},
|
||||
});
|
||||
await teamSchema.update();
|
||||
|
||||
const orgSchema = new Parse.Schema('contracts_Organizations');
|
||||
orgSchema.setCLP({
|
||||
get: {},
|
||||
find: {},
|
||||
count: {},
|
||||
create: {},
|
||||
update: {},
|
||||
delete: {},
|
||||
addField: {},
|
||||
});
|
||||
|
||||
return orgSchema.update();
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Parse} Parse
|
||||
*/
|
||||
exports.down = async Parse => {
|
||||
const teamSchema = new Parse.Schema('contracts_Teams');
|
||||
teamSchema.setCLP({
|
||||
get: { '*': true },
|
||||
find: { '*': true },
|
||||
count: { '*': true },
|
||||
create: { '*': true },
|
||||
update: { '*': true },
|
||||
delete: { '*': true },
|
||||
addField: { '*': true },
|
||||
});
|
||||
await teamSchema.update();
|
||||
|
||||
const orgSchema = new Parse.Schema('contracts_Organizations');
|
||||
orgSchema.setCLP({
|
||||
get: { '*': true },
|
||||
find: { '*': true },
|
||||
count: { '*': true },
|
||||
create: { '*': true },
|
||||
update: { '*': true },
|
||||
delete: { '*': true },
|
||||
addField: { '*': true },
|
||||
});
|
||||
|
||||
return orgSchema.update();
|
||||
};
|
||||
Reference in New Issue
Block a user