1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab ft=cpp
5 * Ceph - scalable distributed file system
7 * Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
9 * This is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License version 2.1, as published by the Free Software
12 * Foundation. See file COPYING.
18 #include "rgw_auth_s3.h"
22 class RGWOp_ZoneConfig_Get
: public RGWRESTOp
{
23 RGWZoneParams zone_params
;
25 RGWOp_ZoneConfig_Get() {}
27 int check_caps(const RGWUserCaps
& caps
) override
{
28 return caps
.check_cap("zone", RGW_CAP_READ
);
30 int verify_permission(optional_yield
) override
{
31 return check_caps(s
->user
->get_caps());
33 void execute(optional_yield
) override
{} /* driver already has the info we need, just need to send response */
34 void send_response() override
;
35 const char* name() const override
{
36 return "get_zone_config";
40 class RGWHandler_Config
: public RGWHandler_Auth_S3
{
42 RGWOp
*op_get() override
;
44 int read_permissions(RGWOp
*, optional_yield
) override
{
48 using RGWHandler_Auth_S3::RGWHandler_Auth_S3
;
49 ~RGWHandler_Config() override
= default;
53 class RGWRESTMgr_Config
: public RGWRESTMgr
{
55 RGWRESTMgr_Config() = default;
56 ~RGWRESTMgr_Config() override
= default;
58 RGWHandler_REST
* get_handler(rgw::sal::Driver
* ,
60 const rgw::auth::StrategyRegistry
& auth_registry
,
61 const std::string
&) override
{
62 return new RGWHandler_Config(auth_registry
);