X-Git-Url: https://git.hcoop.net/hcoop/portal.git/blobdiff_plain/f3a41f3b49333bf83355b911d5a6b7a1a64fd634..ac5cb613b0f0a143eaeed801979bfc56e7c88e40:/group.sml diff --git a/group.sml b/group.sml index 75f412a..afab84f 100644 --- a/group.sml +++ b/group.sml @@ -144,6 +144,12 @@ fun requireGroupName grp = else raise Access ("You aren't a member of group \"" ^ grp ^ "\"") +fun requireAnyGroupName groups = + if List.exists (fn grp => inGroupName grp) groups then + () + else + raise Access ("You aren't a member of any groups \"" ^ String.concatWith ", " groups ^ "\"") + fun validGroupName name = size name <= 10 andalso CharVector.all Char.isAlphaNum name