initial code repo
[stor4nfv.git] / src / ceph / src / rgw / rgw_rest_user.h
diff --git a/src/ceph/src/rgw/rgw_rest_user.h b/src/ceph/src/rgw/rgw_rest_user.h
new file mode 100644 (file)
index 0000000..047fe5f
--- /dev/null
@@ -0,0 +1,38 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+
+#ifndef CEPH_RGW_REST_USER_H
+#define CEPH_RGW_REST_USER_H
+
+#include "rgw_rest.h"
+#include "rgw_rest_s3.h"
+
+
+class RGWHandler_User : public RGWHandler_Auth_S3 {
+protected:
+  RGWOp *op_get() override;
+  RGWOp *op_put() override;
+  RGWOp *op_post() override;
+  RGWOp *op_delete() override;
+public:
+  using RGWHandler_Auth_S3::RGWHandler_Auth_S3;
+  ~RGWHandler_User() override = default;
+
+  int read_permissions(RGWOp*) override {
+    return 0;
+  }
+};
+
+class RGWRESTMgr_User : public RGWRESTMgr {
+public:
+  RGWRESTMgr_User() = default;
+  ~RGWRESTMgr_User() override = default;
+
+  RGWHandler_REST *get_handler(struct req_state*,
+                               const rgw::auth::StrategyRegistry& auth_registry,
+                               const std::string&) override {
+    return new RGWHandler_User(auth_registry);
+  }
+};
+
+#endif