File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -47,10 +47,18 @@ int rgw_opa_authorize(RGWOp *& op,
4747 jf.dump_string (" decoded_uri" , s->decoded_uri .c_str ());
4848 jf.dump_string (" params" , s->info .request_params .c_str ());
4949 jf.dump_string (" request_uri_aws4" , s->info .request_uri_aws4 .c_str ());
50- jf.dump_string (" object_name" , s->object ->get_name ().c_str ());
51- jf.dump_string (" subuser" , s->auth .identity ->get_subuser ().c_str ());
52- jf.dump_object (" user_info" , s->user ->get_info ());
53- jf.dump_object (" bucket_info" , s->bucket ->get_info ());
50+ if (s->object ) {
51+ jf.dump_string (" object_name" , s->object ->get_name ().c_str ());
52+ }
53+ if (s->auth .identity ) {
54+ jf.dump_string (" subuser" , s->auth .identity ->get_subuser ().c_str ());
55+ }
56+ if (s->user ) {
57+ jf.dump_object (" user_info" , s->user ->get_info ());
58+ }
59+ if (s->bucket ) {
60+ jf.dump_object (" bucket_info" , s->bucket ->get_info ());
61+ }
5462 jf.close_section ();
5563 jf.close_section ();
5664
You can’t perform that action at this time.
0 commit comments