mirror of
https://github.com/ceph/ceph
synced 2025-01-20 18:21:57 +00:00
rgw: return appropriate error for unresolvable email in acl
This commit is contained in:
parent
b8e791bc61
commit
878f4a45ce
@ -68,7 +68,8 @@ extern string rgw_root_bucket;
|
||||
#define ERR_NO_SUCH_BUCKET 2002
|
||||
#define ERR_METHOD_NOT_ALLOWED 2003
|
||||
#define ERR_INVALID_DIGEST 2004
|
||||
#define ERR_BAD_DIGEST 2005
|
||||
#define ERR_BAD_DIGEST 2005
|
||||
#define ERR_UNRESOLVABLE_EMAIL 2006
|
||||
|
||||
typedef void *RGWAccessHandle;
|
||||
|
||||
|
@ -632,7 +632,7 @@ static int rebuild_policy(RGWAccessControlPolicy& src, RGWAccessControlPolicy& d
|
||||
RGW_LOG(10) << "grant user email=" << email << endl;
|
||||
if (rgw_get_user_info_by_email(email, grant_user) < 0) {
|
||||
RGW_LOG(10) << "grant user email not found or other error" << endl;
|
||||
break;
|
||||
return -ERR_UNRESOLVABLE_EMAIL;
|
||||
}
|
||||
id = grant_user.user_id;
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ const static struct rgw_html_errors RGW_HTML_ERRORS[] = {
|
||||
{ ERR_BAD_DIGEST, 500, "BadDigest" },
|
||||
{ ERR_INVALID_BUCKET_NAME, 400, "InvalidBucketName" },
|
||||
{ ERR_INVALID_OBJECT_NAME, 400, "InvalidObjectName" },
|
||||
{ ERR_UNRESOLVABLE_EMAIL, 400, "UnresolvableGrantByEmailAddress" },
|
||||
{ EACCES, 403, "AccessDenied" },
|
||||
{ EPERM, 403, "AccessDenied" },
|
||||
{ ENOENT, 404, "NoSuchKey" },
|
||||
|
Loading…
Reference in New Issue
Block a user