=== Test case: graphql_muc_SUITE:user_member_set_user_affiliation/1 (click for source code)

=== Config value:

    [{watchdog,<0.19630.0>},
     {schema_endpoint,user},
     {{ejabberd_cwd,mongooseim@localhost},
      "/home/circleci/project/_build/mim1/rel/mongooseim"},
     {preset,"pgsql_cets"},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/graphql_muc_SUITE_data"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@e5832022abeb.2023-11-13_18.57.12/big_tests.tests.graphql_muc_SUITE.logs/run.2023-11-13_18.59.56/graphql_muc_suite.user_member_set_user_affiliation.21252.html"},
     {tc_group_properties,[{name,user_muc_configured},parallel]},
     {tc_group_path,[[{name,user}]]},
     {data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/graphql_muc_SUITE_data/"},
     {priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@e5832022abeb.2023-11-13_18.57.12/big_tests.tests.graphql_muc_SUITE.logs/run.2023-11-13_18.59.56/log_private/"},
     {{saved_modules,mongooseim@localhost,<<"localhost">>},
      #{mod_vcard =>
            #{matches => 30,
              host => {prefix,<<"vjud.">>},
              search => true,iqdisc => parallel,backend => rdbms},
        mod_roster =>
            #{iqdisc => one_queue,backend => rdbms,versioning => false,
              store_current_id => false},
        mod_amp => #{},
        mod_sic => #{iqdisc => one_queue},
        mod_register =>
            #{access => register,iqdisc => one_queue,
              registration_watchers => [],password_strength => 0,
              ip_access => [{allow,"127.0.0.0/8"},{deny,"0.0.0.0/0"}]},
        mod_presence => #{},
        mod_disco =>
            #{iqdisc => one_queue,server_info => [],extra_domains => [],
              users_can_see_hidden_services => false},
        mod_stream_management =>
            #{buffer => true,ack => true,backend => cets,
              stale_h =>
                  #{enabled => false,repeat_after => 1800,geriatric => 3600},
              buffer_max => 100,ack_freq => 1,resume_timeout => 600},
        mod_adhoc => #{iqdisc => one_queue,report_commands_node => false},
        mod_bosh =>
            #{backend => cets,inactivity => 30,max_pause => 120,
              max_wait => infinity,server_acks => false},
        mod_cache_users =>
            #{strategy => fifo,number_of_segments => 5,time_to_live => 2},
        mod_carboncopy => #{iqdisc => no_queue}}},
     {{saved_modules,mongooseim@localhost,<<"localhost.bis">>},
      #{mod_vcard =>
            #{matches => 30,
              host => {prefix,<<"vjud.">>},
              search => true,iqdisc => parallel,backend => rdbms},
        mod_roster =>
            #{iqdisc => one_queue,backend => rdbms,versioning => false,
              store_current_id => false},
        mod_amp => #{},
        mod_sic => #{iqdisc => one_queue},
        mod_register =>
            #{access => register,iqdisc => one_queue,
              registration_watchers => [],password_strength => 0,
              ip_access => [{allow,"127.0.0.0/8"},{deny,"0.0.0.0/0"}]},
        mod_presence => #{},
        mod_disco =>
            #{iqdisc => one_queue,server_info => [],extra_domains => [],
              users_can_see_hidden_services => false},
        mod_stream_management =>
            #{buffer => true,ack => true,backend => cets,
              stale_h =>
                  #{enabled => false,repeat_after => 1800,geriatric => 3600},
              buffer_max => 100,ack_freq => 1,resume_timeout => 600},
        mod_adhoc => #{iqdisc => one_queue,report_commands_node => false},
        mod_bosh =>
            #{backend => cets,inactivity => 30,max_pause => 120,
              max_wait => infinity,server_acks => false},
        mod_cache_users =>
            #{strategy => fifo,number_of_segments => 5,time_to_live => 2},
        mod_carboncopy => #{iqdisc => no_queue}}}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@e5832022abeb.2023-11-13_18.57.12"

=== Started at 2023-11-13 18:59:57


*** CT 2023-11-13 18:59:57.396 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_1403.html

*** User 2023-11-13 18:59:57.504 ***🔗
alicE_user_member_set_user_affiliation_870@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2023-11-13 18:59:57.506 ***🔗
alicE_user_member_set_user_affiliation_870@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='3c985b6907a83ff5' from='localhost' version='1.0' xml:lang='en'>

*** User 2023-11-13 18:59:57.507 ***🔗
alicE_user_member_set_user_affiliation_870@localhost/res1 in
<stream:features>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2023-11-13 18:59:57.507 ***🔗
alicE_user_member_set_user_affiliation_870@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg3MABtYXR5Z3J5c2E=</auth>



*** User 2023-11-13 18:59:57.509 ***🔗
alicE_user_member_set_user_affiliation_870@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2023-11-13 18:59:57.509 ***🔗
alicE_user_member_set_user_affiliation_870@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2023-11-13 18:59:57.510 ***🔗
alicE_user_member_set_user_affiliation_870@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='58cf1db53d4ba7da' from='localhost' version='1.0' xml:lang='en' to='alice_user_member_set_user_affiliation_870@localhost'>

*** User 2023-11-13 18:59:57.511 ***🔗
alicE_user_member_set_user_affiliation_870@localhost/res1 in
<stream:features>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2023-11-13 18:59:57.511 ***🔗
alicE_user_member_set_user_affiliation_870@localhost/res1 out
<iq type='set' id='29ca6de10bdc0e2f1b79977a656bee66'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>


Could not find element wait_for_parallel_writer in Config.


*** User 2023-11-13 18:59:57.511 ***🔗
alicE_user_member_set_user_affiliation_870@localhost/res1 in
<iq id='29ca6de10bdc0e2f1b79977a656bee66' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_user_member_set_user_affiliation_870@localhost/res1</jid>
	</bind>
</iq>



*** User 2023-11-13 18:59:57.512 ***🔗
alice_user_member_set_user_affiliation_870@localhost/res1 out
<iq type='set' id='8fd37d8272478176b1cb14db0dea47b9'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2023-11-13 18:59:57.513 ***🔗
alice_user_member_set_user_affiliation_870@localhost/res1 in
<iq from='localhost' to='alice_user_member_set_user_affiliation_870@localhost/res1' id='8fd37d8272478176b1cb14db0dea47b9' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2023-11-13 18:59:57.513 ***🔗
alice_user_member_set_user_affiliation_870@localhost/res1 out
<presence/>



*** User 2023-11-13 18:59:57.517 ***🔗
alice_user_member_set_user_affiliation_870@localhost/res1 in
<presence from='alice_user_member_set_user_affiliation_870@localhost/res1' to='alice_user_member_set_user_affiliation_870@localhost/res1'/>



*** User 2023-11-13 18:59:57.520 ***🔗
bOb_user_member_set_user_affiliation_870@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2023-11-13 18:59:57.521 ***🔗
bOb_user_member_set_user_affiliation_870@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='c60ed226f0447cec' from='localhost' version='1.0' xml:lang='en'>

*** User 2023-11-13 18:59:57.521 ***🔗
bOb_user_member_set_user_affiliation_870@localhost/res1 in
<stream:features>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2023-11-13 18:59:57.522 ***🔗
bOb_user_member_set_user_affiliation_870@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl91c2VyX21lbWJlcl9zZXRfdXNlcl9hZmZpbGlhdGlvbl84NzAAbWFrcm9saWth</auth>



*** User 2023-11-13 18:59:57.525 ***🔗
bOb_user_member_set_user_affiliation_870@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2023-11-13 18:59:57.581 ***🔗
bOb_user_member_set_user_affiliation_870@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2023-11-13 18:59:57.582 ***🔗
bOb_user_member_set_user_affiliation_870@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='9d15406756b12161' from='localhost' version='1.0' xml:lang='en' to='bob_user_member_set_user_affiliation_870@localhost'>

*** User 2023-11-13 18:59:57.582 ***🔗
bOb_user_member_set_user_affiliation_870@localhost/res1 in
<stream:features>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2023-11-13 18:59:57.582 ***🔗
bOb_user_member_set_user_affiliation_870@localhost/res1 out
<iq type='set' id='01f8a07214dc87fb560c84d68513f50a'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2023-11-13 18:59:57.583 ***🔗
bOb_user_member_set_user_affiliation_870@localhost/res1 in
<iq id='01f8a07214dc87fb560c84d68513f50a' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_user_member_set_user_affiliation_870@localhost/res1</jid>
	</bind>
</iq>



*** User 2023-11-13 18:59:57.583 ***🔗
bob_user_member_set_user_affiliation_870@localhost/res1 out
<iq type='set' id='015a150b6545c93708d710bc768523a0'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2023-11-13 18:59:57.584 ***🔗
bob_user_member_set_user_affiliation_870@localhost/res1 in
<iq from='localhost' to='bob_user_member_set_user_affiliation_870@localhost/res1' id='015a150b6545c93708d710bc768523a0' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2023-11-13 18:59:57.586 ***🔗
bob_user_member_set_user_affiliation_870@localhost/res1 out
<presence/>



*** User 2023-11-13 18:59:57.588 ***🔗
bob_user_member_set_user_affiliation_870@localhost/res1 in
<presence from='bob_user_member_set_user_affiliation_870@localhost/res1' to='bob_user_member_set_user_affiliation_870@localhost/res1'/>



*** User 2023-11-13 18:59:57.588 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2023-11-13 18:59:57.589 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='4b8fbf1527728981' from='localhost' version='1.0' xml:lang='en'>

*** User 2023-11-13 18:59:57.589 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 in
<stream:features>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2023-11-13 18:59:57.589 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGthdGVfdXNlcl9tZW1iZXJfc2V0X3VzZXJfYWZmaWxpYXRpb25fODcwAG1ha3Jvd2U7cA==</auth>



*** User 2023-11-13 18:59:57.592 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2023-11-13 18:59:57.592 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2023-11-13 18:59:57.592 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='b6275c057bd6c966' from='localhost' version='1.0' xml:lang='en' to='kate_user_member_set_user_affiliation_870@localhost'>

*** User 2023-11-13 18:59:57.593 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 in
<stream:features>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2023-11-13 18:59:57.593 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 out
<iq type='set' id='ca65d99b9d02f520588adcdc73f3196d'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2023-11-13 18:59:57.593 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 in
<iq id='ca65d99b9d02f520588adcdc73f3196d' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>kate_user_member_set_user_affiliation_870@localhost/res1</jid>
	</bind>
</iq>



*** User 2023-11-13 18:59:57.594 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 out
<iq type='set' id='6cbf1149d516ae2b8cc74e3a394d858f'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2023-11-13 18:59:57.595 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 in
<iq from='localhost' to='kate_user_member_set_user_affiliation_870@localhost/res1' id='6cbf1149d516ae2b8cc74e3a394d858f' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2023-11-13 18:59:57.595 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 out
<presence/>



*** User 2023-11-13 18:59:57.596 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 in
<presence from='kate_user_member_set_user_affiliation_870@localhost/res1' to='kate_user_member_set_user_affiliation_870@localhost/res1'/>



*** User 2023-11-13 18:59:57.599 ***🔗
REST request:
Code: 200
Req: {<0.20188.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"ddfec24b6b120157">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfdXNlcl9tZW1iZXJfc2V0X3VzZXJfYWZmaWxpYXRpb25fODcwQGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
      <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"bob_user_member_set_user_affiliation_870@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 13 Nov 2023 18:59:56 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"70">>}],
         <<"{\"data\":{\"muc\":{\"setUserAffiliation\":\"Affiliation set successfully\"}}}">>,
         208,1046}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          body =>
              <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"bob_user_member_set_user_affiliation_870@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          role => {graphql,user},
          creds =>
              {<<"alice_user_member_set_user_affiliation_870@localhost">>,
               <<"matygrysa">>},
          return_maps => true,return_headers => true}


*** User 2023-11-13 18:59:57.602 ***🔗
REST request:
Code: 200
Req: {<0.20199.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"d1757a8aad3fafb1">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg3MEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_870@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 13 Nov 2023 18:59:56 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"278">>}],
         <<"{\"errors\":[{\"path\":[\"muc\",\"setUserAffiliation\"],\"message\":\"Given user does not have permission to set the member affiliation\",\"extensions\":{\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         417,1238}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          body =>
              <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_870@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          role => {graphql,user},
          creds =>
              {<<"bob_user_member_set_user_affiliation_870@localhost">>,
               <<"makrolika">>},
          return_maps => true,return_headers => true}


*** User 2023-11-13 18:59:57.604 ***🔗
REST request:
Code: 200
Req: {<0.20211.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"84aea54250479f1d">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg3MEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"variables\":{\"affiliation\":\"ADMIN\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_870@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 13 Nov 2023 18:59:56 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"277">>}],
         <<"{\"errors\":[{\"path\":[\"muc\",\"setUserAffiliation\"],\"message\":\"Given user does not have permission to set the admin affiliation\",\"extensions\":{\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         416,925}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          body =>
              <<"{\"variables\":{\"affiliation\":\"ADMIN\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_870@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          role => {graphql,user},
          creds =>
              {<<"bob_user_member_set_user_affiliation_870@localhost">>,
               <<"makrolika">>},
          return_maps => true,return_headers => true}


*** User 2023-11-13 18:59:57.607 ***🔗
REST request:
Code: 200
Req: {<0.20222.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"cafa0b6d74a3f122">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg3MEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"variables\":{\"affiliation\":\"OWNER\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_870@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 13 Nov 2023 18:59:56 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"277">>}],
         <<"{\"errors\":[{\"path\":[\"muc\",\"setUserAffiliation\"],\"message\":\"Given user does not have permission to set the owner affiliation\",\"extensions\":{\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         416,1499}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          body =>
              <<"{\"variables\":{\"affiliation\":\"OWNER\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_870@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          role => {graphql,user},
          creds =>
              {<<"bob_user_member_set_user_affiliation_870@localhost">>,
               <<"makrolika">>},
          return_maps => true,return_headers => true}


*** User 2023-11-13 18:59:57.610 ***🔗
REST request:
Code: 200
Req: {<0.20235.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"4b96934f35cf86db">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfdXNlcl9tZW1iZXJfc2V0X3VzZXJfYWZmaWxpYXRpb25fODcwQGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
      <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_870@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 13 Nov 2023 18:59:56 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"70">>}],
         <<"{\"data\":{\"muc\":{\"setUserAffiliation\":\"Affiliation set successfully\"}}}">>,
         208,1174}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          body =>
              <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_870@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          role => {graphql,user},
          creds =>
              {<<"alice_user_member_set_user_affiliation_870@localhost">>,
               <<"matygrysa">>},
          return_maps => true,return_headers => true}


*** User 2023-11-13 18:59:57.612 ***🔗
REST request:
Code: 200
Req: {<0.20243.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"e06798acb8cd69d1">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg3MEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"variables\":{\"affiliation\":\"NONE\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_870@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 13 Nov 2023 18:59:56 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"276">>}],
         <<"{\"errors\":[{\"path\":[\"muc\",\"setUserAffiliation\"],\"message\":\"Given user does not have permission to set the none affiliation\",\"extensions\":{\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         415,998}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          body =>
              <<"{\"variables\":{\"affiliation\":\"NONE\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_870@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          role => {graphql,user},
          creds =>
              {<<"bob_user_member_set_user_affiliation_870@localhost">>,
               <<"makrolika">>},
          return_maps => true,return_headers => true}


*** User 2023-11-13 18:59:57.612 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 out
</stream:stream>

*** User 2023-11-13 18:59:57.612 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 in
</stream:stream>

*** User 2023-11-13 18:59:57.612 ***🔗
bob_user_member_set_user_affiliation_870@localhost/res1 out
</stream:stream>

*** User 2023-11-13 18:59:57.612 ***🔗
bob_user_member_set_user_affiliation_870@localhost/res1 in
</stream:stream>

*** User 2023-11-13 18:59:57.613 ***🔗
alice_user_member_set_user_affiliation_870@localhost/res1 out
</stream:stream>

*** User 2023-11-13 18:59:57.613 ***🔗
alice_user_member_set_user_affiliation_870@localhost/res1 in
</stream:stream>

*** User 2023-11-13 18:59:57.614 ***🔗
waiting for room_archive_size is done in 0 miliseconds
*** CT 2023-11-13 18:59:57.695 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_1404.html



=== Ended at 2023-11-13 18:59:57
=== successfully completed test case
=== === Returned value: ok