summaryrefslogtreecommitdiff
path: root/users/app/controllers
diff options
context:
space:
mode:
authorjessib <jessib@riseup.net>2013-11-18 15:44:54 -0800
committerjessib <jessib@riseup.net>2013-11-18 15:44:54 -0800
commit8e9b65b01bbd9d44d4077d94f2dc4ac375cf8e85 (patch)
treec6e59e7a1e837b8cf759948acd8874594e54e19d /users/app/controllers
parentd2eaffde87286c0cc9c0658503a60706759f7f51 (diff)
Start of service level code, which will be tweaked
* stores desired & effective service level * whenever desired level is changed, effective level will be updated * allows user to set their desired service level * allow admin to update desired & effective service level
Diffstat (limited to 'users/app/controllers')
-rw-r--r--users/app/controllers/users_controller.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/users/app/controllers/users_controller.rb b/users/app/controllers/users_controller.rb
index 3cbb6dc..8b4715c 100644
--- a/users/app/controllers/users_controller.rb
+++ b/users/app/controllers/users_controller.rb
@@ -34,6 +34,12 @@ class UsersController < UsersBaseController
def edit
end
+ ## added so updating service level works, but not sure we will actually want this. also not sure that this is place to prevent user from updating own effective service level, but here as placeholder:
+ def update
+ @user.update_attributes(params[:user]) unless (!admin? and params[:user][:effective_service_level])
+ respond_with @user
+ end
+
def deactivate
@user.enabled = false
@user.save