diff --git a/.gitignore b/.gitignore
index 5e2c5cb..55d02be 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,3 @@
-node_modules
node
logs/
*.log
diff --git a/public/js/controllers.js b/public/js/controllers.js
index 5341a50..3ae17cf 100644
--- a/public/js/controllers.js
+++ b/public/js/controllers.js
@@ -347,10 +347,12 @@ biomed.ClientEditCtrl = function($scope, $routeParams, Clients) {
}
$scope.toggleFrequency = function(frequency, month) {
- $scope.master.frequencies[frequency][month] =! $scope.master.frequencies[frequency][month];
- Clients.update({id: $scope.master._id}, $scope.master, function() {
- updatePms();
- });
+ if (accountHasPermission('system.edit')) {
+ $scope.master.frequencies[frequency][month] =! $scope.master.frequencies[frequency][month];
+ Clients.update({id: $scope.master._id}, $scope.master, function() {
+ updatePms();
+ });
+ }
}
};
diff --git a/public/partials/clients/edit.html b/public/partials/clients/edit.html
index 40146a5..7f32cae 100644
--- a/public/partials/clients/edit.html
+++ b/public/partials/clients/edit.html
@@ -6,8 +6,8 @@
{{master.identifier}}{{master.name}}