]> git.proxmox.com Git - ceph.git/blame - ceph/src/rgw/rgw_acl_swift.h
update sources to 12.2.7
[ceph.git] / ceph / src / rgw / rgw_acl_swift.h
CommitLineData
7c673cae
FG
1// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2// vim: ts=8 sw=2 smarttab
3
4#ifndef CEPH_RGW_ACL_SWIFT_H
5#define CEPH_RGW_ACL_SWIFT_H
6
7#include <map>
8#include <vector>
9#include <string>
10#include <include/types.h>
11
224ce89b
WB
12#include <boost/optional.hpp>
13
7c673cae
FG
14#include "rgw_acl.h"
15
16class RGWAccessControlPolicy_SWIFT : public RGWAccessControlPolicy
17{
18 int add_grants(RGWRados *store,
19 const std::vector<std::string>& uids,
20 uint32_t perm);
21
22public:
23 explicit RGWAccessControlPolicy_SWIFT(CephContext* const cct)
24 : RGWAccessControlPolicy(cct) {
25 }
26 ~RGWAccessControlPolicy_SWIFT() override = default;
27
28 int create(RGWRados *store,
29 const rgw_user& id,
30 const std::string& name,
28e407b8
AA
31 const char* read_list,
32 const char* write_list,
7c673cae
FG
33 uint32_t& rw_mask);
34 void filter_merge(uint32_t mask, RGWAccessControlPolicy_SWIFT *policy);
35 void to_str(std::string& read, std::string& write);
36};
37
38class RGWAccessControlPolicy_SWIFTAcct : public RGWAccessControlPolicy
39{
40public:
41 RGWAccessControlPolicy_SWIFTAcct(CephContext * const cct)
42 : RGWAccessControlPolicy(cct) {
43 }
44 ~RGWAccessControlPolicy_SWIFTAcct() override {}
45
46 void add_grants(RGWRados *store,
47 const std::vector<std::string>& uids,
48 uint32_t perm);
49 bool create(RGWRados *store,
50 const rgw_user& id,
51 const std::string& name,
52 const std::string& acl_str);
224ce89b 53 boost::optional<std::string> to_str() const;
7c673cae
FG
54};
55#endif