@@ -114,19 +114,19 @@ type credPerm struct {
114114var goodClients = []credPerm {
115115 {
116116 ClientCredentials {Username : & jch , Password : "topsecret" },
117- []string {"op" , "present" , "token" },
117+ []string {"op" , "present" , "message" , " token" },
118118 },
119119 {
120120 ClientCredentials {Username : & john , Password : "secret" },
121- []string {"present" },
121+ []string {"present" , "message" },
122122 },
123123 {
124124 ClientCredentials {Username : & james , Password : "secret2" },
125- []string {},
125+ []string {"message" },
126126 },
127127 {
128128 ClientCredentials {Username : & paul , Password : "secret3" },
129- []string {},
129+ []string {"message" },
130130 },
131131 {
132132 ClientCredentials {Username : & peter , Password : "secret4" },
@@ -189,29 +189,29 @@ func TestExtraPermissions(t *testing.T) {
189189 }
190190 }
191191
192- doit ("jch" , []string {"op" , "token" , "present" })
193- doit ("john" , []string {"present" })
192+ doit ("jch" , []string {"op" , "token" , "present" , "message" })
193+ doit ("john" , []string {"present" , "message" })
194194 doit ("james" , []string {})
195195
196196 d .AllowRecording = true
197197 d .UnrestrictedTokens = false
198198
199- doit ("jch" , []string {"op" , "record" , "token" , "present" })
200- doit ("john" , []string {"present" })
199+ doit ("jch" , []string {"op" , "record" , "token" , "present" , "message" })
200+ doit ("john" , []string {"present" , "message" })
201201 doit ("james" , []string {})
202202
203203 d .AllowRecording = false
204204 d .UnrestrictedTokens = true
205205
206- doit ("jch" , []string {"op" , "token" , "present" })
207- doit ("john" , []string {"token" , "present" })
206+ doit ("jch" , []string {"op" , "token" , "present" , "message" })
207+ doit ("john" , []string {"token" , "present" , "message" })
208208 doit ("james" , []string {})
209209
210210 d .AllowRecording = true
211211 d .UnrestrictedTokens = true
212212
213- doit ("jch" , []string {"op" , "record" , "token" , "present" })
214- doit ("john" , []string {"token" , "present" })
213+ doit ("jch" , []string {"op" , "record" , "token" , "present" , "message" })
214+ doit ("john" , []string {"token" , "present" , "message" })
215215 doit ("james" , []string {})
216216}
217217
0 commit comments