Message from discussion
Breaking changes to auth branch
Received: by 10.66.87.161 with SMTP id az1mr3258314pab.38.1348540431806;
Mon, 24 Sep 2012 19:33:51 -0700 (PDT)
X-BeenThere: meteor-core@googlegroups.com
Received: by 10.68.242.38 with SMTP id wn6ls21193346pbc.8.gmail; Mon, 24 Sep
2012 19:33:51 -0700 (PDT)
Received: by 10.66.83.40 with SMTP id n8mr2313583pay.42.1348540431540;
Mon, 24 Sep 2012 19:33:51 -0700 (PDT)
Received: by 10.66.83.40 with SMTP id n8mr2313580pay.42.1348540431528;
Mon, 24 Sep 2012 19:33:51 -0700 (PDT)
Return-Path: <t...@thesnail.org>
Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49])
by gmr-mx.google.com with ESMTPS id g4si3023979paw.1.2012.09.24.19.33.51
(version=TLSv1/SSLv3 cipher=OTHER);
Mon, 24 Sep 2012 19:33:51 -0700 (PDT)
Received-SPF: pass (google.com: domain of t...@thesnail.org designates 209.85.220.49 as permitted sender) client-ip=209.85.220.49;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of t...@thesnail.org designates 209.85.220.49 as permitted sender) smtp.mail=...@thesnail.org
Received: by mail-pa0-f49.google.com with SMTP id bi5so1882562pad.36
for <meteor-core@googlegroups.com>; Mon, 24 Sep 2012 19:33:51 -0700 (PDT)
d=google.com; s=20120113;
h=date:from:to:message-id:in-reply-to:references:subject:x-mailer
:mime-version:content-type:x-gm-message-state;
bh=CX+Rf9+Q0Ms+TxqBa42HwYNvdzbJih7ey2p2Jdbc0FA=;
b=N2I6HmhOADo9CvKH8YapMJPRLXD4N7/H3mDpej7DkGQOPWhJK8voYX4v1lwpsTH6Ht
ZjaoZAyXo6dKK6NFZGHcQi7ulGp1T0l6afrWLQx8AHiEIYpaog7iifuIaq6vUyfwEg06
YiiBjtslO22nO4oRHfU8IKfqQsgpWV84om8Oiz0DjrcVdARbvsClSPtHWo/2Qgx1ywWm
79Hyv6JkQyljtfcTcmVUFZ01JVo9vWx9Y3uqIyH1TY/zBDhq6nverIdHc6jaM7JiiTXK
Q9ZTcCSBR5gIuqo1bN8WM9zFDOfR0cuMKTjxhsHFDigkrjme+k8TP79RwoI5ojFdDMhq
wv+A==
Received: by 10.68.130.67 with SMTP id oc3mr41951958pbb.18.1348540431258;
Mon, 24 Sep 2012 19:33:51 -0700 (PDT)
Return-Path: <t...@thesnail.org>
Received: from [10.0.0.152] (124-148-183-150.dyn.iinet.net.au. [124.148.183.150])
by mx.google.com with ESMTPS id sj5sm10537815pbc.30.2012.09.24.19.33.48
(version=SSLv3 cipher=OTHER);
Mon, 24 Sep 2012 19:33:50 -0700 (PDT)
Date: Tue, 25 Sep 2012 12:33:46 +1000
From: Tom Coleman <t...@thesnail.org>
To: meteor-core@googlegroups.com
Message-ID: <680CFE5EFB864CA2982FE282FC4D7...@thesnail.org>
In-Reply-To: <CAMpkn3g3xy+ZVNg-=qeJZPq4HjkTPrY=DUyzwbmwSRYASYQ...@mail.gmail.com>
References: <CAMpkn3g3xy+ZVNg-=qeJZPq4HjkTPrY=DUyzwbmwSRYASYQ...@mail.gmail.com>
Subject: Re: [meteor-core] Breaking changes to auth branch
X-Mailer: sparrow 1.6.3 (build 1172)
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="5061180a_490b7c5_ba"
X-Gm-Message-State: ALoCoQlC6HGz6H99pXnyqxakLpZg0cKIZQtPukEnR4UU/62P/kNUFxQCJPwCjbLON6yccQITyvIH
--5061180a_490b7c5_ba
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi Nick.
When you say:
On Saturday, 22 September 2012 at 8:53 AM, Nick Martin wrote:
> -> If you have any additional fields on your user records that you want visible to the client, you must either explicitly publish them (if you do not want them directly editable by the user) or move them to the 'profile' sub-object (if you do want them editable).
Do you mean to setup another publication on the users collection? Something like:
Meteor.publish(null, function() {
if (this.userId())
return Meteor.users.find({_id: this.userId()},
{fields: {specialField: true}});
else
return null;
}, {is_auto: true});
Cheers,
Tom.
--5061180a_490b7c5_ba
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
<div>Hi Nick.
</div><div><br></div><div>When you say:</div>
<div></div>
=20
<p style=3D=22color: =23A0A0A8;=22>On Saturday, 22 Septem=
ber 2012 at 8:53 AM, Nick Martin wrote:</p>
<blockquote type=3D=22cite=22 style=3D=22border-left-styl=
e:solid;border-width:1px;margin-left:0px;padding-left:10px;=22>
<span><span style=3D=22color: rgb(0, 0, 0); font-fami=
ly: Helvetica; font-size: 13px; font-style: normal; font-variant: normal;=
font-weight: normal; letter-spacing: normal; line-height: normal; orphan=
s: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; w=
hite-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjus=
t: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, =
255); display: inline =21important; float: none; =22>-> If you have an=
y additional fields on your user records that you want visible to the cli=
ent, you must either explicitly publish them (if you do not want them dir=
ectly editable by the user) or move them to the 'profile' sub-object (if =
you do want them editable).</span></span>
=20
=20
=20
=20
</blockquote>
=20
<div>Do you mean to setup another publication on the user=
s collection=3F Something like:</div><div><br></div><div><div> Mete=
or.publish(null, function() =7B</div><div> if (this.userId()=
)</div><div> return Meteor.users.find(=7B=5Fid: this.=
userId()=7D,</div><div> &=
nbsp; =7Bfields: =7B=
special=46ield: true=7D=7D);</div><div> else</div><div> =
; return null;</div><div> =7D, =7Bis=5Fauto: true=7D)=
;</div></div><div><br></div><div>Cheers,</div><div>Tom.</div>
--5061180a_490b7c5_ba--