HCoop
/
hcoop
/
portal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
release portal3 into production
[hcoop/portal.git]
/
group.sml
diff --git
a/group.sml
b/group.sml
index
75f412a
..
afab84f
100644
(file)
--- a/
group.sml
+++ b/
group.sml
@@
-144,6
+144,12
@@
fun requireGroupName grp =
else
raise Access ("You aren't a member of group \"" ^ 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
fun validGroupName name =
size name <= 10
andalso CharVector.all Char.isAlphaNum name