payment: note that Stripe has instituted an additional 1% fee for non-US cards
[hcoop/portal.git] / group.sig
CommitLineData
208e2cbc
AC
1signature GROUP =
2sig
3 type group = {id :int, name : string}
4 type membership = {usr : int, grp : int}
5
6 val addGroup : string -> int
7 val lookupGroup : int -> group
8 val modGroup : group -> unit
9 val deleteGroup : int -> unit
10 val listGroups : unit -> group list
11
12 val validGroupName : string -> bool
13 val groupNameToId : string -> int option
14
15 val userInGroupNum : int * int -> bool
16 val userInGroupName : int * string -> bool
f3a41f3b 17 val userReallyInGroupName : int * string -> bool (* Doesn't count root group *)
208e2cbc
AC
18
19 val addToGroup : membership -> unit
20 val addToGroups : int * int list -> unit
21 val removeFromGroup : membership -> unit
22 val groupMembers : int -> Init.user list
23
24 val inGroupNum : int -> bool
25 val inGroupName : string -> bool
f3a41f3b 26 val reallyInGroupName : string -> bool
208e2cbc
AC
27
28 (* These raise Access if the check fails *)
29 val requireGroupNum : int -> unit
30 val requireGroupName : string -> unit
9d7ffa5f 31 val requireAnyGroupName : string list -> unit
f3a41f3b 32end