Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphQL MUC Light - Allow rest admin to delete each room #3576

Merged
merged 4 commits into from
Mar 7, 2022

Conversation

Premwoik
Copy link
Contributor

@Premwoik Premwoik commented Mar 7, 2022

This PR changes the delete_room command (used by the admin Rest API) not to execute the delete function as the passed user. This fixes #3472.

By the way, I noticed that I forgot to change theroomName to roomID in the documentation and in the command definitions. So I fixed it here.

@Premwoik Premwoik changed the base branch from master to feature/graphql March 7, 2022 12:51
@mongoose-im

This comment was marked as outdated.

@codecov
Copy link

codecov bot commented Mar 7, 2022

Codecov Report

Merging #3576 (b4475bf) into feature/graphql (5da0e04) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##           feature/graphql    #3576      +/-   ##
===================================================
+ Coverage            81.39%   81.41%   +0.01%     
===================================================
  Files                  463      463              
  Lines                33141    33140       -1     
===================================================
+ Hits                 26976    26980       +4     
+ Misses                6165     6160       -5     
Impacted Files Coverage Δ
src/muc_light/mod_muc_light_api.erl 96.29% <100.00%> (-0.75%) ⬇️
src/muc_light/mod_muc_light_commands.erl 84.84% <100.00%> (-0.45%) ⬇️
src/mam/mod_mam_muc_rdbms_arch_async.erl 82.85% <0.00%> (-2.86%) ⬇️
src/http_upload/mod_http_upload.erl 94.62% <0.00%> (-2.16%) ⬇️
src/rdbms/mongoose_rdbms.erl 62.54% <0.00%> (-1.10%) ⬇️
src/pubsub/mod_pubsub_db_mnesia.erl 92.43% <0.00%> (-0.43%) ⬇️
src/muc_light/mod_muc_light_db_rdbms.erl 92.11% <0.00%> (-0.42%) ⬇️
src/ejabberd_sm.erl 84.59% <0.00%> (-0.33%) ⬇️
src/ejabberd_c2s.erl 88.75% <0.00%> (+0.07%) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5da0e04...b4475bf. Read the comment docs.

@Premwoik Premwoik force-pushed the graphql/muc-light-api-fix-admin-rest branch from 67e5e92 to 9770b93 Compare March 7, 2022 13:02
@mongoose-im
Copy link
Collaborator

mongoose-im commented Mar 7, 2022

small_tests_23 / small_tests / 9770b93
Reports root / small


small_tests_24 / small_tests / 9770b93
Reports root / small


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 9770b93
Reports root/ big
OK: 2881 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


dynamic_domains_mysql_redis_24 / mysql_redis / 9770b93
Reports root/ big
OK: 2863 / Failed: 1 / User-skipped: 150 / Auto-skipped: 0

bosh_SUITE:essential:accept_higher_hold_value
{error,
  {{assertEqual,
     [{module,bosh_SUITE},
      {line,251},
      {expression,"get_bosh_sessions ( )"},
      {expected,[]},
      {value,
        [{bosh_session,<<"4548e52a9fb7e5d33859d6dc7d167a53ba491035">>,
           <8637.7314.0>}]}]},
   [{bosh_SUITE,accept_higher_hold_value,1,
      [{file,"/home/circleci/project/big_tests/tests/bosh_SUITE.erl"},
       {line,251}]},
    {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1783}]},
    {test_server,run_test_case_eval1,6,
      [{file,"test_server.erl"},{line,1292}]},
    {test_server,run_test_case_eval,9,
      [{file,"test_server.erl"},{line,1224}]}]}}

Report log


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 9770b93
Reports root/ big
OK: 2881 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 9770b93
Reports root/ big
OK: 1565 / Failed: 0 / User-skipped: 427 / Auto-skipped: 19

jingle_SUITE:init_per_suite
{'EXIT',
 {{badrpc,
   {'EXIT',
  {{badmatch,
    {error,
     {nkpacket,
    {bad_return,
     {{nkpacket_app,start,[normal,[]]},
      {'EXIT',
       {{badmatch,{error,eafnosupport}},
      [{nkpacket_stun,check_stun_server,5,
        [{file,
        "/home/circleci/project/_build/default/lib/nkpacket/src/nkpacket_stun.erl"},
         {line,277}]},
       {nkpacket_stun,get_stun_servers,4,
        [{file,
        "/home/circleci/project/_build/default/lib/nkpacket/src/nkpacket_stun.erl"},
         {line,261}]},
       {nkpacket_stun,get_stun_servers,1,
        [{file,
        "/home/circleci/project/_build/default/lib/nkpacket/src/nkpacket_stun.erl"},
         {line,97}]},
       {nkpacket_stun,ext_ip,1,
        [{file,
        "/home/circleci/project/_build/default/lib/nkpacket/src/nkpacket_stun.erl"},
         {line,75}]},
       {nkpacket_app,get_auto_ips,0,
        [{file,
        "/home/circleci/project/_build/default/lib/nkpacket/src/nkpacket_app.erl"},
         {line,113}]},
       {nkpacket_app,start,2,
        [{file,
        "/home/circleci/project/_build/default/lib/nkpacket/src/nkpacket_app.erl"},
         {line,58}]},
       {application_master,start_it_old,4,
        [{file,"application_master.erl"},{line,293}]}]}}}}}}},
   [{mod_jingle_sip,start_nksip_service_or_error,1,
     [{file,"/home/circleci/project/src/jingle_sip/mod_jingle_sip.erl"},
    {line,62}]},
    {mod_jingle_sip,start,2,
     [{file,"/home/circleci/project/src/jingle_sip/mod_jingle_sip.erl"}...

Report log


ldap_mnesia_23 / ldap_mnesia / 9770b93
Reports root/ big
OK: 1584 / Failed: 0 / User-skipped: 427 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 9770b93
Reports root/ big
OK: 2881 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


internal_mnesia_24 / internal_mnesia / 9770b93
Reports root/ big
OK: 1630 / Failed: 0 / User-skipped: 381 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / 9770b93
Reports root/ big
OK: 3255 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / 9770b93
Reports root/ big
OK: 3250 / Failed: 0 / User-skipped: 147 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 9770b93
Reports root/ big
OK: 1938 / Failed: 0 / User-skipped: 382 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 9770b93
Reports root/ big
OK: 3255 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / 9770b93
Reports root/ big
OK: 3255 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 9770b93
Reports root/ big
OK: 1786 / Failed: 0 / User-skipped: 379 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 9770b93
Reports root/ big
OK: 1584 / Failed: 0 / User-skipped: 427 / Auto-skipped: 0

@Premwoik Premwoik changed the title GraphQL MUC Light - Allow admin to delete room without user GraphQL MUC Light - Allow rest admin to delete each room Mar 7, 2022
@Premwoik Premwoik marked this pull request as ready for review March 7, 2022 14:10
Copy link
Member

@chrzaszcz chrzaszcz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

big_tests/tests/muc_light_http_api_SUITE.erl Outdated Show resolved Hide resolved
@mongoose-im
Copy link
Collaborator

mongoose-im commented Mar 7, 2022

small_tests_23 / small_tests / b4475bf
Reports root / small


small_tests_24 / small_tests / b4475bf
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / b4475bf
Reports root/ big
OK: 2881 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / b4475bf
Reports root/ big
OK: 2881 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


dynamic_domains_mysql_redis_24 / mysql_redis / b4475bf
Reports root/ big
OK: 2864 / Failed: 0 / User-skipped: 150 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / b4475bf
Reports root/ big
OK: 1584 / Failed: 0 / User-skipped: 427 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / b4475bf
Reports root/ big
OK: 2881 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / b4475bf
Reports root/ big
OK: 1584 / Failed: 0 / User-skipped: 427 / Auto-skipped: 0


internal_mnesia_24 / internal_mnesia / b4475bf
Reports root/ big
OK: 1630 / Failed: 0 / User-skipped: 381 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / b4475bf
Reports root/ big
OK: 1938 / Failed: 0 / User-skipped: 382 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / b4475bf
Reports root/ big
OK: 3255 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / b4475bf
Reports root/ big
OK: 3250 / Failed: 0 / User-skipped: 147 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / b4475bf
Reports root/ big
OK: 3255 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / b4475bf
Reports root/ big
OK: 3255 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / b4475bf
Reports root/ big
OK: 1786 / Failed: 0 / User-skipped: 379 / Auto-skipped: 0

@chrzaszcz chrzaszcz self-requested a review March 7, 2022 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants