X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Frgw%2Frgw_user.h;h=5e6754b0380ccee2fef8fc5a7f0af8e5311b7a51;hb=d2e6a577eb19928d58b31d1b6e096ca0f03c4052;hp=7a27d0e7007939118505ec36d690278c195e22bd;hpb=31f18b776d001752a193a7cec8bb49033c1a904c;p=ceph.git diff --git a/ceph/src/rgw/rgw_user.h b/ceph/src/rgw/rgw_user.h index 7a27d0e70..5e6754b03 100644 --- a/ceph/src/rgw/rgw_user.h +++ b/ceph/src/rgw/rgw_user.h @@ -48,6 +48,8 @@ struct RGWUID WRITE_CLASS_ENCODER(RGWUID) extern int rgw_user_sync_all_stats(RGWRados *store, const rgw_user& user_id); +extern int rgw_user_get_all_buckets_stats(RGWRados *store, const rgw_user& user_id, map&buckets_usage_map); + /** * Get the anonymous (ie, unauthenticated) user info. */ @@ -113,9 +115,6 @@ extern int rgw_get_user_attrs_by_uid(RGWRados *store, * Given an RGWUserInfo, deletes the user and its bucket ACLs. */ extern int rgw_delete_user(RGWRados *store, RGWUserInfo& user, RGWObjVersionTracker& objv_tracker); -/** - * Store a list of the user's buckets, with associated functinos. - */ /* * remove the different indexes @@ -125,14 +124,11 @@ extern int rgw_remove_uid_index(RGWRados *store, rgw_user& uid); extern int rgw_remove_email_index(RGWRados *store, string& email); extern int rgw_remove_swift_name_index(RGWRados *store, string& swift_name); -/* - * An RGWUser class along with supporting classes created - * to support the creation of an RESTful administrative API - */ - extern void rgw_perm_to_str(uint32_t mask, char *buf, int len); extern uint32_t rgw_str_to_perm(const char *str); +extern int rgw_validate_tenant_name(const string& t); + enum ObjectKeyType { KEY_TYPE_SWIFT, KEY_TYPE_S3, @@ -151,6 +147,10 @@ enum RGWUserId { RGW_ACCESS_KEY, }; +/* + * An RGWUser class along with supporting classes created + * to support the creation of an RESTful administrative API + */ struct RGWUserAdminOpState { // user attributes RGWUserInfo info; @@ -199,7 +199,7 @@ struct RGWUserAdminOpState { bool op_mask_specified; bool caps_specified; bool suspension_op; - bool admin_specified; + bool admin_specified = false; bool system_specified; bool key_op; bool temp_url_key_specified; @@ -248,10 +248,7 @@ struct RGWUserAdminOpState { } void set_user_email(std::string& email) { - if (email.empty()) - return; - - /* always lowercase email address */ + /* always lowercase email address */ boost::algorithm::to_lower(email); user_email = email; user_email_specified = true;