]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: check for bucket swift permissions only if failed
authorYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 28 Feb 2012 22:05:52 +0000 (14:05 -0800)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 28 Feb 2012 22:05:52 +0000 (14:05 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
src/rgw/rgw_common.cc

index 2e001ba232bb2f93e183e92552689a293fc65a43..9b9d3f8307f330fd816c05fdca74265c36a6f1c3 100644 (file)
@@ -350,6 +350,9 @@ bool verify_bucket_permission(struct req_state *s, int perm)
   if ((perm & (int)s->perm_mask) != perm)
     return false;
 
+  if (s->bucket_acl->verify_permission(s->user.user_id, perm, perm))
+    return true;
+
   if (perm & (RGW_PERM_READ | RGW_PERM_READ_ACP))
     perm |= RGW_PERM_READ_OBJS;
   if (perm & RGW_PERM_WRITE)