parent
95d3f9ebe1
commit
8b059ac877
|
@ -14,16 +14,16 @@ type searchAndFilter struct {
|
|||
|
||||
func widgetSearchAndFilter(widget *Widget, hvars interface{}) (out string, err error) {
|
||||
header := hvars.(*Header)
|
||||
user := header.CurrentUser
|
||||
u := header.CurrentUser
|
||||
var forums []filterForum
|
||||
var canSee []int
|
||||
if user.IsSuperAdmin {
|
||||
if u.IsSuperAdmin {
|
||||
canSee, err = Forums.GetAllVisibleIDs()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
} else {
|
||||
group, err := Groups.Get(user.Group)
|
||||
group, err := Groups.Get(u.Group)
|
||||
if err != nil {
|
||||
// TODO: Revisit this
|
||||
return "", errors.New("Something weird happened")
|
||||
|
|
|
@ -1841,6 +1841,13 @@ func TestMFAStore(t *testing.T) {
|
|||
it, err = c.MFAstore.Get(1)
|
||||
test(i)
|
||||
}
|
||||
expectNilErr(t, it.Delete())
|
||||
_, err = c.MFAstore.Get(-1)
|
||||
recordMustNotExist(t, err, "mfa uid -1 should not exist")
|
||||
_, err = c.MFAstore.Get(0)
|
||||
recordMustNotExist(t, err, "mfa uid 0 should not exist")
|
||||
_, err = c.MFAstore.Get(1)
|
||||
recordMustNotExist(t, err, "mfa uid 1 should not exist")
|
||||
}
|
||||
|
||||
// TODO: Expand upon the valid characters which can go in URLs?
|
||||
|
|
Loading…
Reference in New Issue