| 1 | signature GROUP = |
| 2 | sig |
| 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 |
| 17 | val userReallyInGroupName : int * string -> bool (* Doesn't count root group *) |
| 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 |
| 26 | val reallyInGroupName : string -> bool |
| 27 | |
| 28 | (* These raise Access if the check fails *) |
| 29 | val requireGroupNum : int -> unit |
| 30 | val requireGroupName : string -> unit |
| 31 | end |