mirror of
https://github.com/wekan/wekan.git
synced 2025-12-27 04:38:49 +01:00
UI for rules list
This commit is contained in:
parent
d5870472fb
commit
f63482b587
19 changed files with 256 additions and 2 deletions
38
models/rules.js
Normal file
38
models/rules.js
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
Rules = new Mongo.Collection('rules');
|
||||
|
||||
Rules.attachSchema(new SimpleSchema({
|
||||
title: {
|
||||
type: String,
|
||||
optional: true,
|
||||
},
|
||||
description: {
|
||||
type: String,
|
||||
optional: true,
|
||||
},
|
||||
}));
|
||||
|
||||
Rules.mutations({
|
||||
rename(description) {
|
||||
return { $set: { description } };
|
||||
},
|
||||
});
|
||||
|
||||
Rules.allow({
|
||||
update: function () {
|
||||
// add custom authentication code here
|
||||
return true;
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
if (Meteor.isServer) {
|
||||
Meteor.startup(() => {
|
||||
const rules = Rules.findOne({});
|
||||
if(!rules){
|
||||
Rules.insert({title: "regola1", description: "bella"});
|
||||
Rules.insert({title: "regola2", description: "bella2"});
|
||||
}
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue