ui and settings ready
This commit is contained in:
@@ -6,3 +6,27 @@ Template.body.helpers({
|
||||
return Session.get("templateName");
|
||||
}
|
||||
});
|
||||
|
||||
controller_state = function() {
|
||||
var controller = Session.get('controller_id');
|
||||
var result = {}
|
||||
if (controller) {
|
||||
result = ControllerState.findOne({
|
||||
controller_id: controller
|
||||
});
|
||||
}
|
||||
|
||||
if (!result) {
|
||||
result = {}
|
||||
};
|
||||
return result;
|
||||
};
|
||||
|
||||
accessible = function(feature) {
|
||||
var controller = controller_state();
|
||||
|
||||
console.log('cotnroller ', controller);
|
||||
if (!controller.features) return false;
|
||||
|
||||
return controller.features[feature] === true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user