package com.conveyal.analysis;

import com.google.common.collect.Sets;

import java.util.Set;

/**
 * Groups together all information about what a user is allowed to do.
 * Currently all such information is known from the group ID.
 * In the future we might have an EnumSet of additional flags, or a simple enum of "power levels".
 */
public class UserPermissions {

    public final String email;

    public final Set<String> groups;

    public final boolean admin;

    public UserPermissions (String email, boolean admin, String... groups) {
        this.email = email;
        this.admin = admin;
        this.groups = Sets.newHashSet(groups);
    }

    @Override
    public String toString () {
        return "UserPermissions{" +
                "email='" + email + '\'' +
                ", groups='" + groups + '\'' +
                '}';
    }
}

@@ -29,71 +29,8 @@
 s;%0A%0A
-import com.google.common.collect.Sets;%0A%0Aimport java.util.Set;%0A%0A
 /**%0A
@@ -350,26 +350,26 @@
 nal 
-Set%3C
 String
-%3E g
+ accessG
 roup
-s
 ;%0A%0A 
@@ -467,18 +467,20 @@
 ring
-... g
+ accessG
 roup
-s
 ) %7B%0A
@@ -552,40 +552,33 @@
 his.
-g
+accessG
 roup
-s
  = 
-Sets.newHashSet(g
+accessG
 roup
-s)
 ;%0A  
@@ -730,26 +730,36 @@
  %22, 
-g
+accessG
 roup
-s
 ='%22 + 
-g
+accessG
 roup
-s
  + '

Update UserPermissions.java