cout << " of read, write, readwrite, full\n";
cout << " --display-name=<name>\n";
cout << " --max_buckets max number of buckets for a user\n";
+ cout << " --admin set the admin flag on the user\n";
cout << " --system set the system flag on the user\n";
cout << " --bucket=<bucket>\n";
cout << " --pool=<pool>\n";
string start_marker;
string end_marker;
int max_entries = -1;
+ int admin = false;
+ bool admin_specified = false;
int system = false;
bool system_specified = false;
int shard_id = -1;
// do nothing
} else if (ceph_argparse_binary_flag(args, i, &skip_zero_entries, NULL, "--skip_zero_entries", (char*)NULL)) {
// do nothing
+ } else if (ceph_argparse_binary_flag(args, i, &admin, NULL, "--admin", (char*)NULL)) {
+ admin_specified = true;
} else if (ceph_argparse_binary_flag(args, i, &system, NULL, "--system", (char*)NULL)) {
system_specified = true;
} else if (ceph_argparse_binary_flag(args, i, &staging, NULL, "--staging", (char*)NULL)) {
if (max_buckets >= 0)
user_op.set_max_buckets(max_buckets);
+ if (admin_specified)
+ user_op.set_admin(admin);
+
if (system_specified)
user_op.set_system(system);
uint32_t max_buckets;
uint32_t op_mask;
RGWUserCaps caps;
+ __u8 admin;
__u8 system;
string default_placement;
list<string> placement_tags;
map<int, string> temp_url_keys;
RGWQuotaInfo user_quota;
- RGWUserInfo() : auid(0), suspended(0), max_buckets(RGW_DEFAULT_MAX_BUCKETS), op_mask(RGW_OP_TYPE_ALL), system(0) {}
+ RGWUserInfo()
+ : auid(0),
+ suspended(0),
+ max_buckets(RGW_DEFAULT_MAX_BUCKETS),
+ op_mask(RGW_OP_TYPE_ALL),
+ admin(0),
+ system(0) {
+ }
RGWAccessKey* get_key0() {
if (access_keys.empty())
}
void encode(bufferlist& bl) const {
- ENCODE_START(17, 9, bl);
+ ENCODE_START(18, 9, bl);
::encode(auid, bl);
string access_key;
string secret_key;
::encode(temp_url_keys, bl);
::encode(user_quota, bl);
::encode(user_id.tenant, bl);
+ ::encode(admin, bl);
ENCODE_FINISH(bl);
}
void decode(bufferlist::iterator& bl) {
- DECODE_START_LEGACY_COMPAT_LEN_32(17, 9, 9, bl);
+ DECODE_START_LEGACY_COMPAT_LEN_32(18, 9, 9, bl);
if (struct_v >= 2) ::decode(auid, bl);
else auid = CEPH_AUTH_UID_DEFAULT;
string access_key;
} else {
user_id.tenant.clear();
}
+ if (struct_v >= 18) {
+ ::decode(admin, bl);
+ }
DECODE_FINISH(bl);
}
void dump(Formatter *f) const;
}
user_info.suspended = op_state.get_suspension_status();
+ user_info.admin = op_state.admin;
user_info.system = op_state.system;
if (op_state.op_mask_specified)
if (op_state.max_buckets_specified)
user_info.max_buckets = op_state.get_max_buckets();
+ if (op_state.admin_specified)
+ user_info.admin = op_state.admin;
+
if (op_state.system_specified)
user_info.system = op_state.system;
std::string display_name;
uint32_t max_buckets;
__u8 suspended;
+ __u8 admin;
__u8 system;
__u8 exclusive;
__u8 fetch_stats;
bool op_mask_specified;
bool caps_specified;
bool suspension_op;
+ bool admin_specified;
bool system_specified;
bool key_op;
bool temp_url_key_specified;
suspension_op = true;
}
+ void set_admin(__u8 is_admin) {
+ admin = is_admin;
+ admin_specified = true;
+ }
+
void set_system(__u8 is_system) {
system = is_system;
system_specified = true;
key_type = -1;
perm_mask = RGW_PERM_NONE;
suspended = 0;
+ admin = 0;
system = 0;
exclusive = 0;
fetch_stats = 0;
of read, write, readwrite, full
--display-name=<name>
--max_buckets max number of buckets for a user
+ --admin set the admin flag on the user
--system set the system flag on the user
--bucket=<bucket>
--pool=<pool>