mirror of
https://github.com/wekan/wekan.git
synced 2026-02-20 23:14:07 +01:00
Rename notice -> announcement
This commit is contained in:
parent
aa1876f94c
commit
a88ac6113e
9 changed files with 39 additions and 39 deletions
|
|
@ -1,36 +0,0 @@
|
|||
Notices = new Mongo.Collection('notices');
|
||||
|
||||
Notices.attachSchema(new SimpleSchema({
|
||||
enabled: {
|
||||
type: Boolean,
|
||||
defaultValue: false,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
optional: true,
|
||||
},
|
||||
body: {
|
||||
type: String,
|
||||
optional: true,
|
||||
},
|
||||
sort: {
|
||||
type: Number,
|
||||
decimal: true,
|
||||
},
|
||||
}));
|
||||
|
||||
Notices.allow({
|
||||
update(userId) {
|
||||
const user = Users.findOne(userId);
|
||||
return user && user.isAdmin;
|
||||
},
|
||||
});
|
||||
|
||||
if (Meteor.isServer) {
|
||||
Meteor.startup(() => {
|
||||
const notices = Notices.findOne({});
|
||||
if(!notices){
|
||||
Notices.insert({enabled: false, sort: 0});
|
||||
}
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue