]>
Commit | Line | Data |
---|---|---|
7c673cae | 1 | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- |
9f95a23c | 2 | // vim: ts=8 sw=2 smarttab ft=cpp |
7c673cae | 3 | |
1e59de90 | 4 | #pragma once |
7c673cae FG |
5 | |
6 | #include <map> | |
7 | #include <vector> | |
8 | #include <string> | |
9 | #include <include/types.h> | |
10 | ||
224ce89b WB |
11 | #include <boost/optional.hpp> |
12 | ||
7c673cae FG |
13 | #include "rgw_acl.h" |
14 | ||
9f95a23c TL |
15 | class RGWUserCtl; |
16 | ||
7c673cae FG |
17 | class RGWAccessControlPolicy_SWIFT : public RGWAccessControlPolicy |
18 | { | |
1e59de90 | 19 | int add_grants(const DoutPrefixProvider *dpp, rgw::sal::Driver* driver, |
7c673cae FG |
20 | const std::vector<std::string>& uids, |
21 | uint32_t perm); | |
22 | ||
23 | public: | |
24 | explicit RGWAccessControlPolicy_SWIFT(CephContext* const cct) | |
25 | : RGWAccessControlPolicy(cct) { | |
26 | } | |
27 | ~RGWAccessControlPolicy_SWIFT() override = default; | |
28 | ||
20effc67 | 29 | int create(const DoutPrefixProvider *dpp, |
1e59de90 | 30 | rgw::sal::Driver* driver, |
7c673cae FG |
31 | const rgw_user& id, |
32 | const std::string& name, | |
28e407b8 AA |
33 | const char* read_list, |
34 | const char* write_list, | |
7c673cae FG |
35 | uint32_t& rw_mask); |
36 | void filter_merge(uint32_t mask, RGWAccessControlPolicy_SWIFT *policy); | |
37 | void to_str(std::string& read, std::string& write); | |
38 | }; | |
39 | ||
40 | class RGWAccessControlPolicy_SWIFTAcct : public RGWAccessControlPolicy | |
41 | { | |
42 | public: | |
11fdf7f2 | 43 | explicit RGWAccessControlPolicy_SWIFTAcct(CephContext * const cct) |
7c673cae FG |
44 | : RGWAccessControlPolicy(cct) { |
45 | } | |
46 | ~RGWAccessControlPolicy_SWIFTAcct() override {} | |
47 | ||
20effc67 | 48 | void add_grants(const DoutPrefixProvider *dpp, |
1e59de90 | 49 | rgw::sal::Driver* driver, |
7c673cae FG |
50 | const std::vector<std::string>& uids, |
51 | uint32_t perm); | |
20effc67 | 52 | bool create(const DoutPrefixProvider *dpp, |
1e59de90 | 53 | rgw::sal::Driver* driver, |
7c673cae FG |
54 | const rgw_user& id, |
55 | const std::string& name, | |
56 | const std::string& acl_str); | |
224ce89b | 57 | boost::optional<std::string> to_str() const; |
7c673cae | 58 | }; |