summaryrefslogtreecommitdiff
path: root/app/models/api_user.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-03-20 01:13:24 -0700
committerelijah <elijah@riseup.net>2016-03-28 16:03:54 -0700
commitc63791c7ffacb7c6cfc685e2654ffe66f0a6b185 (patch)
treebe68b1c5906d06f2669e102d99ea6ca02b7d2856 /app/models/api_user.rb
parentef5f9636863a8bddb704714027c6540dc5a0b781 (diff)
api tokens: allow for special api tokens that work like session tokens but are configured in the static config, to be used for infrastructure monitoring.
Diffstat (limited to 'app/models/api_user.rb')
-rw-r--r--app/models/api_user.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/app/models/api_user.rb b/app/models/api_user.rb
new file mode 100644
index 0000000..d80a4d1
--- /dev/null
+++ b/app/models/api_user.rb
@@ -0,0 +1,23 @@
+
+class ApiUser < AnonymousUser
+end
+
+#
+# A user that has limited admin access, to be used
+# for running monitor tests against a live production
+# installation.
+#
+class ApiTestUser < ApiUser
+ def is_test?
+ true
+ end
+end
+
+#
+# Not yet supported:
+#
+#class ApiAdminUser < ApiUser
+# def is_admin?
+# true
+# end
+#end \ No newline at end of file