Software /
code /
prosody
Annotate
spec/scansion/muc_whois_anyone_member.scs @ 9830:d935a0f0de24
MUC: Factor out role change permission check into its own method
I would like to invert this logic so that it checks if the role change
is allowed instead of checking if it is not allowed as it does now, in
order to make it easier to understand.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 24 Feb 2019 16:18:30 +0100 |
parent | 9620:ddcb28c8f64b |
child | 11712:d117b92fd8e4 |
rev | line source |
---|---|
9620
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
1 # MUC: Allow members to fetch the affiliation lists in open non-anonymous rooms |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
2 |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
3 [Client] Romeo |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
4 jid: romeo@localhost/MsliYo9C |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
5 password: password |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
6 |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
7 [Client] Juliet |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
8 jid: juliet@localhost/vJrUtY4Z |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
9 password: password |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
10 |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
11 ----- |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
12 |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
13 Romeo connects |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
14 |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
15 Romeo sends: |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
16 <presence to='issue1230@conference.localhost/romeo'> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
17 <x xmlns='http://jabber.org/protocol/muc'/> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
18 </presence> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
19 |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
20 Romeo receives: |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
21 <presence from='issue1230@conference.localhost/romeo'> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
22 <x xmlns='http://jabber.org/protocol/muc#user'> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
23 <status code='201'/> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
24 <item jid="${Romeo's JID}" role='moderator' affiliation='owner'/> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
25 <status code='110'/> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
26 </x> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
27 </presence> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
28 |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
29 Romeo receives: |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
30 <message from='issue1230@conference.localhost' type='groupchat'> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
31 <subject/> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
32 </message> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
33 |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
34 Romeo sends: |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
35 <iq id='lx3' type='set' to='issue1230@conference.localhost'> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
36 <query xmlns='http://jabber.org/protocol/muc#owner'> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
37 <x type='submit' xmlns='jabber:x:data'> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
38 <field var='FORM_TYPE'> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
39 <value>http://jabber.org/protocol/muc#roomconfig</value> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
40 </field> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
41 <field var='muc#roomconfig_whois'> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
42 <value>anyone</value> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
43 </field> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
44 </x> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
45 </query> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
46 </iq> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
47 |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
48 Romeo receives: |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
49 <iq from='issue1230@conference.localhost' type='result' id='lx3'/> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
50 |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
51 Romeo receives: |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
52 <message from='issue1230@conference.localhost' type='groupchat'> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
53 <x xmlns='http://jabber.org/protocol/muc#user'> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
54 <status code='172'/> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
55 </x> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
56 </message> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
57 |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
58 Juliet connects |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
59 |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
60 Juliet sends: |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
61 <presence to='issue1230@conference.localhost/juliet'> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
62 <x xmlns='http://jabber.org/protocol/muc'/> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
63 </presence> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
64 |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
65 Juliet receives: |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
66 <presence from='issue1230@conference.localhost/romeo'> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
67 <x xmlns='http://jabber.org/protocol/muc#user'> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
68 <item jid="${Romeo's JID}" role='moderator' affiliation='owner'/> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
69 </x> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
70 </presence> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
71 |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
72 Juliet receives: |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
73 <presence from='issue1230@conference.localhost/juliet'> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
74 <x xmlns='http://jabber.org/protocol/muc#user'> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
75 <status code='100'/> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
76 <item jid="${Juliet's JID}" role='participant' affiliation='none'/> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
77 <status code='110'/> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
78 </x> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
79 </presence> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
80 |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
81 Juliet receives: |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
82 <message from='issue1230@conference.localhost' type='groupchat'> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
83 <subject/> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
84 </message> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
85 |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
86 Juliet sends: |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
87 <iq id='lx2' type='get' to='issue1230@conference.localhost'> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
88 <query xmlns='http://jabber.org/protocol/muc#admin'> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
89 <item affiliation='member'/> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
90 </query> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
91 </iq> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
92 |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
93 Juliet receives: |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
94 <iq from='issue1230@conference.localhost' type='result' id='lx2'> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
95 <query xmlns='http://jabber.org/protocol/muc#admin'/> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
96 </iq> |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
97 |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
98 Juliet disconnects |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
99 |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
100 Romeo disconnects |
ddcb28c8f64b
MUC: Add scanison test case for #1230
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
101 |