Merge branch 'master' of https://github.com/ksjdragon/hourglass
This commit is contained in:
commit
5c3025363f
@ -86,6 +86,7 @@ Template.registerHelper('myClasses', () => {
|
||||
}
|
||||
Session.set("noclass",false);
|
||||
return array;
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@ -143,7 +144,7 @@ Template.main.helpers({
|
||||
calendarOptions() {
|
||||
var events = [];
|
||||
calendarclasses = Session.get("calendarclasses");
|
||||
var cursor = work.find({class: {$in: userclasses}});
|
||||
var cursor = work.find({class: {$in: calendarclasses}});
|
||||
cursor.forEach(function(current) {
|
||||
backgroundColor = calendarColors[current.type];
|
||||
title = current.name;
|
||||
@ -311,12 +312,14 @@ Template.main.events({
|
||||
openDivFade(document.getElementsByClassName("overlay")[0]);
|
||||
},
|
||||
'click .change' (event) {
|
||||
if(!Session.get("newWork")) {
|
||||
if(!(Meteor.userId() === Session.get("currentWork").creator ||
|
||||
Roles.userIsInRole(Meteor.userId(), ['superadmin', 'admin']) ||
|
||||
classes.findOne({_id: Session.get("currentWork")._id}).moderators.indexOf(Meteor.userId()) !== -1 ||
|
||||
classes.findOne({_id: Session.get("currentWork")._id}).blockEdit.indexOf(Meteor.userId()) !== -1 ||
|
||||
classes.findOne({_id: Session.get("currentWork")._id}).banned.indexOf(Meteor.userId()) !== -1
|
||||
)) return;
|
||||
}
|
||||
|
||||
var ele = event.target;
|
||||
var sessval = Session.get("modifying");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user