+ /*
+ * Note about the utility functions below.
+ * We have roughly 4 groups of operations:
+ * 1) Regular system usage for tracking time, etc.
+ * 2) Registration process - used infrequently.
+ * 3) Admin usage - used infrequently.
+ * 4) Export - used infrequently.
+ *
+ * It is tempting to have a generic function to get things done for
+ * all situations. However, as registration, export and admin access are one-off
+ * operations, while regular system usage is daily and must be efficient,
+ * the current approach is to have SEPARATE functions for each mode.
+ *
+ * This is because each mode requires a slightly different approach,
+ * and we don't want to over-complicate things.
+ */
+
+ // getRoles - obtains all roles defined for group.
+ function getRoles() {