web client: don't show the link for expired shares

This commit is contained in:
Nicola Murino
2021-11-25 20:09:11 +01:00
parent 3f3591bae0
commit dc19921b0c
5 changed files with 38 additions and 14 deletions

View File

@@ -220,6 +220,7 @@ func (a *Admin) validate() error {
if a.Email != "" && !emailRegex.MatchString(a.Email) {
return util.NewValidationError(fmt.Sprintf("email %#v is not valid", a.Email))
}
a.Filters.AllowList = util.RemoveDuplicates(a.Filters.AllowList)
for _, IPMask := range a.Filters.AllowList {
_, _, err := net.ParseCIDR(IPMask)
if err != nil {