Change userfacing term allow-list to member(s)

This commit is contained in:
Henry 2021-02-16 11:55:13 +01:00
parent 412545ac50
commit 9b0c9580d1
5 changed files with 21 additions and 20 deletions

View File

@ -86,7 +86,7 @@ func TestAllowList(t *testing.T) {
}
ts.AllowListDB.ListReturns(lst, nil)
html, resp := ts.Client.GetHTML("/allow-list", nil)
html, resp := ts.Client.GetHTML("/members", nil)
a.Equal(http.StatusOK, resp.Code, "wrong HTTP status code")
assertLocalized(t, html, []localizedElement{
@ -102,7 +102,7 @@ func TestAllowList(t *testing.T) {
}
ts.AllowListDB.ListReturns(lst, nil)
html, resp = ts.Client.GetHTML("/allow-list", nil)
html, resp = ts.Client.GetHTML("/members", nil)
a.Equal(http.StatusOK, resp.Code, "wrong HTTP status code")
assertLocalized(t, html, []localizedElement{
@ -117,7 +117,7 @@ func TestAllowList(t *testing.T) {
// check for link to remove confirm link
link, yes := elems.ContentsFiltered("a").Attr("href")
a.True(yes, "a-tag has href attribute")
a.Equal("/allow-list/remove/confirm?id=666", link)
a.Equal("/members/remove/confirm?id=666", link)
}
func TestAllowListRemoveConfirmation(t *testing.T) {

View File

@ -38,10 +38,10 @@ func Handler(r *render.Renderer, roomState *roomstate.Manager, al admindb.AllowL
al: al,
}
mux.HandleFunc("/allow-list", r.HTML("/admin/allow-list.tmpl", ah.overview))
mux.HandleFunc("/allow-list/add", ah.add)
mux.HandleFunc("/allow-list/remove/confirm", r.HTML("/admin/allow-list-remove-confirm.tmpl", ah.removeConfirm))
mux.HandleFunc("/allow-list/remove", ah.remove)
mux.HandleFunc("/members", r.HTML("/admin/allow-list.tmpl", ah.overview))
mux.HandleFunc("/members/add", ah.add)
mux.HandleFunc("/members/remove/confirm", r.HTML("/admin/allow-list-remove-confirm.tmpl", ah.removeConfirm))
mux.HandleFunc("/members/remove", ah.remove)
return customStripPrefix("/admin", mux)
}

View File

@ -15,11 +15,12 @@ AuthSignOut = "Sign out"
AdminDashboardWelcome = "Welcome to your dashboard"
AdminDashboardTitle = "Room Admin Dashboard"
AdminAllowListTitle = "List of allowed people"
AdminAllowListWelcome = "Here you can see the whole list and add or remove people from it."
AdminAllowListAdd = "Add to list"
AdminAllowListRemoveConfirmWelcome = "Just to verify that this is the entry you want deleted"
AdminAllowListRemoveConfirmTitle = "Really remove this Entry from the Allow list?"
AdminAllowListTitle = "List of room members"
AdminAllowListWelcome = "Here you can see all the members of the room and ways to add new ones or remove exising ones."
AdminAllowListAdd = "Add member"
AdminAllowListRemoveConfirmWelcome = "Just to verify that this is the member you want removed"
AdminAllowListRemoveConfirmTitle = "Confirm member removal"
NavAdminDashboard = "Admin Dasboard"

View File

@ -21,14 +21,14 @@ var Defaults = func() http.FileSystem {
fs := vfsgen۰FS{
"/": &vfsgen۰DirInfo{
name: "/",
modTime: time.Date(2021, 2, 11, 15, 43, 30, 498222603, time.UTC),
modTime: time.Date(2021, 2, 15, 13, 43, 55, 575838238, time.UTC),
},
"/active.en.toml": &vfsgen۰CompressedFileInfo{
name: "active.en.toml",
modTime: time.Date(2021, 2, 15, 10, 58, 38, 310605935, time.UTC),
uncompressedSize: 1053,
modTime: time.Date(2021, 2, 16, 10, 54, 17, 666210637, time.UTC),
uncompressedSize: 1196,
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\x7c\x53\xdb\x6a\xdc\x30\x10\x7d\xd7\x57\x0c\x7e\x49\x0b\xad\xff\x20\x94\x90\x34\xd0\xb2\x24\x65\x1b\x28\x25\xf4\x41\x6b\xcd\x5a\xa2\xb2\xc6\x1d\x8d\xd6\x98\x90\x7f\x2f\x92\x2f\x7b\x21\xe4\x69\xe5\x33\x67\xce\x9c\xb9\xec\x2d\x85\xbd\xe3\x0e\xae\xa1\x9a\x9f\x95\xfa\xa1\x5b\x7c\x20\xb9\xa7\x14\x4c\x0e\x3c\x59\x04\xc6\x7f\x09\xa3\xa0\x81\x5e\xb7\x08\x83\x8e\x10\x48\x60\x9f\x39\x75\xa5\xd4\x46\x07\xe3\x42\xfb\xe4\xc4\x63\xce\x21\xab\x1d\x74\x23\x30\x51\x57\x2d\xd1\x5f\xe8\x1b\xea\x4a\x7c\x46\x60\x98\x21\x8b\x8c\x95\x52\x0f\x38\xc4\x13\x56\xa4\x4f\x30\x58\x2d\x60\x75\xdf\x63\x30\xf0\x81\xb1\xc1\x20\x7e\xfc\x58\x15\xee\x5a\x2f\x7f\x4c\xd0\xe3\x01\xf9\xe0\x70\x58\x50\xf8\x0c\x0b\x54\x29\x75\x93\xc4\xde\x6b\xef\x77\xba\xf9\x7b\x52\xe8\x37\x25\x60\xd4\xde\x8f\x10\x2d\x25\x6f\xc2\x95\xc0\x6e\xb2\x55\xd7\x75\x0d\x1b\x94\xab\x08\x2d\x0a\x8c\x94\x40\x2c\x53\x6a\x2d\x88\x75\xb1\xae\xce\x44\x57\x47\x79\x6a\xbd\xd7\x0d\x02\xed\xc1\xeb\x28\xc0\x18\x89\x65\xa2\xff\x74\x6d\xf8\x16\x32\x2f\xbf\xc0\x85\x23\xfc\x98\x64\xc5\x29\x49\x36\x6d\x3a\x17\xee\x74\xb4\x3b\xd2\x6c\x4e\x6c\x2f\x4f\xa1\x6c\x8b\xc1\x2c\x9c\xea\x22\x67\x75\xb5\x25\xea\xa0\xc4\xe0\xee\x82\x7c\xe3\x3d\x0d\x1b\x17\xe5\xc6\x94\xb5\xe7\x1f\x21\xf0\x2e\xca\x25\x63\x8b\x1d\x1d\x70\x3e\x98\x13\x3f\xdf\x53\x94\x9c\x73\x40\x76\xfb\x11\x24\xaf\x2e\xcf\x08\x5c\x04\xb1\x08\x18\x84\xc7\x32\xc1\x41\x07\x01\x83\x1e\x05\xcd\xbb\xea\x47\xe7\xd3\x7a\xb8\x04\x27\xd5\xaf\x45\x6e\xcf\xd4\x15\xf5\x22\x50\xfc\x7e\xc9\xa7\xa4\x0f\xe7\x33\x98\x7a\x9a\x3b\x9f\x1b\x57\xea\x39\x57\xbc\xa5\x14\xe4\x8f\x32\x18\x1b\x76\xbd\x38\x2a\x9b\x69\x31\x20\xbb\x66\x9e\x00\x85\x65\xad\x8c\xb9\x9f\xfc\xed\x04\x3b\xa0\x50\xaa\x6f\x26\x96\x58\x64\xb8\x86\x85\xa8\x19\xe1\xe5\xa5\x2e\x05\x5e\x5f\x4b\x42\x3c\xcf\x50\xcf\xc5\x54\x5e\xcc\xdb\x36\xf2\x21\x85\xd4\xed\x90\xf3\x25\xf5\x48\xbd\x47\x70\x01\xf4\xfc\xe7\x7a\xcb\x58\x8f\x1c\x29\x9f\x55\x29\xb4\x9d\x78\xef\x5b\x3b\x0a\xaf\x29\xff\x03\x00\x00\xff\xff\x94\xbb\x13\x52\x1d\x04\x00\x00"),
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\x7c\x93\xcf\x6a\xdc\x30\x10\xc6\xef\x7e\x8a\x0f\x5f\xd2\x42\xeb\x37\xc8\x21\x24\x84\xb6\x2c\x49\x49\x03\xa5\x84\x1e\xb4\xd6\xac\x2d\x2a\x6b\x5c\x69\xbc\xee\x12\xf2\xee\x65\xe4\x3f\xd9\x5d\x42\x4e\x96\x46\xdf\xcc\xfc\xa4\xf9\x7c\xcd\x61\xe7\x62\x87\x4b\x94\xf3\xb2\x2c\xbe\x9b\x86\xee\x58\x6e\x79\x08\x56\x0f\x1e\x5b\x42\xa4\xbf\x03\x25\x21\x8b\xde\x34\x84\xd1\x24\x04\x16\xec\x54\x53\x95\x45\xb1\x31\xc1\xba\xd0\x3c\x3a\xf1\xa4\x39\xdc\x1a\x87\xee\x80\xc8\xdc\x95\xcb\xe9\x4f\xf2\x35\x77\xf9\x7c\x8e\x60\x9c\x43\x2d\x45\x2a\x8b\xe2\x8e\xc6\x74\xa4\x4a\xfc\x09\x63\x6b\x04\xad\xe9\x7b\x0a\x16\x1f\x22\xd5\x14\xc4\x1f\x3e\x96\x59\xbb\xf6\xd3\xcd\x14\xba\xdf\x53\xdc\x3b\x1a\x97\x28\x3e\x63\x09\x95\x45\x71\x35\x48\x7b\x6b\xbc\xdf\x9a\xfa\xcf\x51\xa3\x5f\x3c\x20\x92\xf1\xfe\x80\xd4\xf2\xe0\x6d\xb8\x10\x6c\x27\xac\xaa\xaa\x2a\x6c\x48\x2e\x12\x1a\x12\x1c\x78\x80\xb4\x91\x87\xa6\x85\xb4\x2e\x55\xe5\x49\xd1\x95\x48\x5f\xad\xf7\xa6\x26\xf0\x0e\xde\x24\x41\xa4\xc4\x51\x26\xf9\x0f\xd7\x84\xaf\x41\x75\xba\x82\x0b\xaf\xe1\xfb\x41\xd6\x38\x0f\xa2\xd0\xb6\x73\xe1\xc6\xa4\x76\xcb\x26\xda\x23\xec\x65\x29\xac\x58\x11\x76\xd1\x94\x67\x39\x2b\xd5\x03\x73\x87\x7c\x86\x9b\x57\xf1\xa4\xbe\xf2\x9e\xc7\x8d\x4b\xb2\xaa\x75\xa3\xf8\x3a\x45\x74\xd4\x6d\x29\xa6\xf2\x4c\x7c\x84\xf3\x85\x22\xe5\xf7\xa9\x4d\x40\x22\x82\xf1\x1e\xd2\xd2\x92\xaa\xa5\x74\x9b\xcb\x99\x60\x31\x9a\x43\x52\x78\x63\x2d\x02\x8d\xe0\x40\x09\x1c\x11\xa9\xe3\x3d\x81\xfe\xb9\xa4\x26\xd1\x70\x75\xde\xf7\xca\x66\x73\xea\x67\x2a\x7f\x2e\x78\xc8\x45\x66\x57\x1f\x51\x7e\x1b\x92\x68\xd3\x3d\x45\xb7\x3b\x40\xd4\x5f\x3a\x48\xb8\x74\x04\x9b\xef\x31\x9a\x20\x33\x8c\x7d\xb7\xfc\xfa\x62\xcb\xff\x34\x17\xc9\xb9\xc6\xab\xb3\xcd\xfe\x74\x24\x13\xfc\x3c\x88\x65\x0e\xc5\x93\x96\xbe\xe6\x21\xc8\xef\xc2\x52\xaa\xa3\xeb\xc5\x71\x36\x4a\x43\x81\xa2\xab\xe1\x5d\x92\xb2\xe0\xb0\xb8\x2c\x92\x92\xeb\xde\x09\x75\xe0\x90\x6f\xb1\x99\x54\xd2\x52\xc4\x25\x16\xa1\x89\x84\xe7\xe7\x2a\x37\x78\x79\xc9\x09\xe9\x34\xa3\x78\xca\x50\xea\x93\xb7\x31\xd4\xd7\x61\xc8\xb7\xe3\x1d\x7a\xe2\xde\x13\x5c\x80\x99\xff\xf5\xb7\xc0\x7a\x8a\x89\xd5\xe5\xb9\xd1\xc3\xa4\x7b\x1f\xed\xb5\xf0\x9a\xf2\x3f\x00\x00\xff\xff\x62\xa7\x69\x7b\xac\x04\x00\x00"),
},
}
fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{

View File

@ -22,10 +22,10 @@ func Admin(m *mux.Router) *mux.Router {
m.Path("/dashboard").Methods("GET").Name(AdminDashboard)
m.Path("/allow-list").Methods("GET").Name(AdminAllowListOverview)
m.Path("/allow-list/add").Methods("POST").Name(AdminAllowListAdd)
m.Path("/allow-list/remove/confirm").Methods("GET").Name(AdminAllowListRemoveConfirm)
m.Path("/allow-list/remove").Methods("POST").Name(AdminAllowListRemove)
m.Path("/members").Methods("GET").Name(AdminAllowListOverview)
m.Path("/members/add").Methods("POST").Name(AdminAllowListAdd)
m.Path("/members/remove/confirm").Methods("GET").Name(AdminAllowListRemoveConfirm)
m.Path("/members/remove").Methods("POST").Name(AdminAllowListRemove)
return m
}