summaryrefslogtreecommitdiff
path: root/app/controllers/controller_extension
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-03-28 15:56:21 -0700
committerelijah <elijah@riseup.net>2016-03-28 16:03:54 -0700
commit9a8577a2d19aa51318dce6ff9ffe1bd26f25c09e (patch)
tree924fe73125e20c26778dca035c0efb28842c40e3 /app/controllers/controller_extension
parente072ac2fa8bc93ed782df1ff95130f4794f9640f (diff)
api: added get(:show) to identities and users, allow monitors to create/delete test & tmp users.
Diffstat (limited to 'app/controllers/controller_extension')
-rw-r--r--app/controllers/controller_extension/authentication.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/controller_extension/authentication.rb b/app/controllers/controller_extension/authentication.rb
index e2b24f0..63b9e5f 100644
--- a/app/controllers/controller_extension/authentication.rb
+++ b/app/controllers/controller_extension/authentication.rb
@@ -34,6 +34,12 @@ module ControllerExtension::Authentication
access_denied unless admin?
end
+ def require_monitor
+ unless current_user.is_monitor? || current_user.is_admin?
+ access_denied
+ end
+ end
+
def authentication_errors
return unless attempted_login?
errors = get_warden_errors