Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
goto done;
}
+ req->log(s, "init op");
+ ret = op->init_processing();
+ if (ret < 0) {
+ abort_early(s, op, ret);
+ goto done;
+ }
+
req->log(s, "verifying op mask");
ret = op->verify_op_mask();
if (ret < 0) {
int RGWOp::init_quota()
{
+ /* no quota enforcement for system requests */
+ if (s->system_request)
+ return 0;
+
/* init quota related stuff */
if (!(s->user.op_mask & RGW_OP_TYPE_MODIFY)) {
return 0;
RGWOp() : s(NULL), dialect_handler(NULL), store(NULL), cors_exist(false) {}
virtual ~RGWOp() {}
+ virtual int init_processing() {
+ int ret = init_quota();
+ if (ret < 0)
+ return ret;
+
+ return 0;
+ }
+
virtual void init(RGWRados *store, struct req_state *s, RGWHandler *dialect_handler) {
this->store = store;
this->s = s;