summaryrefslogtreecommitdiff
path: root/app/controllers/controller_extension/authentication.rb
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-03-31 11:40:44 +0200
committerAzul <azul@riseup.net>2016-03-31 11:40:44 +0200
commitbe5efb57dc9b282a31cf29c9eac27cb5a7e7ac2f (patch)
treece8bee7d2fa4007a1db9815e1af001fe44e329c1 /app/controllers/controller_extension/authentication.rb
parent14c9f2ab7cbf410bcd7fdd75b4a1c11417b30bd7 (diff)
parent48acca107b9bd7a59bacb1449b042eb753e63917 (diff)
Merge remote-tracking branch 'github/211' into develop
Diffstat (limited to 'app/controllers/controller_extension/authentication.rb')
-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