def effective_groups(refresh = false)
      @effective_groups = nil if refresh
      @effective_groups ||= if system_admin?
                              AccessGroup.all.map{ |g| g.to_s.upcase }
                            else
                              groups
                                  .collect{ |g| g.effective_groups }
                                  .flatten
                            end
                                .map{ |g| g.to_s.upcase }
                                .uniq
                                .sort
    end
def effective_groups(refresh = false)
      @effective_groups = nil if refresh
      @effective_groups ||= if system_admin?
                              AccessGroup.all.map{ |g| g.to_s.upcase }
                            else
                              groups
                                  .collect{ |g| g.effective_groups }
                                  .flatten
                            end
                                .map{ |g| g.to_s.upcase }
                                .uniq
                                .sort
    end
Gets the effective group membership of this user.