Setting multiple domains with write permission

18 views
Skip to first unread message

Leif Neve

unread,
Sep 17, 2012, 10:18:57 AM9/17/12
to person...@googlegroups.com
I am trying to allow multiple domains to write to a subdomain. From tools/console I do:

a =Authorization.get("testpm", "xyz")
a.domain_write_permission = u"""\
pl.nlm.nih.gov
plstage.nlm.nih.gov"""
a.put()

However, when I actually try to set the domain_write_permission, App Engine spits back a BadValueError, saying that it is not a multi-line property.
But if I type help(Authorization), it clearly says in the documentation for domain_write_permission that it is a multi-line property.
Maybe it's expecting it in a different format? I also tried just using newline characters, which didn't work either. I attempted to set other
Authorization properties listed as multi-line, which didn't work either. Any ideas what might be wrong?

Lee Schumacher

unread,
Sep 17, 2012, 10:48:37 AM9/17/12
to personfinder on behalf of Leif Neve
On Mon, Sep 17, 2012 at 7:18 AM, personfinder on behalf of Leif Neve <personfinder+noreply-APn2wQeqoub...@googlegroups.com> wrote:
I am trying to allow multiple domains to write to a subdomain. From tools/console I do:

a =Authorization.get("testpm", "xyz")
a.domain_write_permission = u"""\
pl.nlm.nih.gov
plstage.nlm.nih.gov"""
a.put()

However, when I actually try to set the domain_write_permission, App Engine spits back a BadValueError, saying that it is not a multi-line property.

Thats correct.
 
But if I type help(Authorization), it clearly says in the documentation for domain_write_permission that it is a multi-line property.

Strange, that looks like a bug in the doc string.  The field is defined as a StringProperty(), which defaults to multiline=False.
 
Maybe it's expecting it in a different format? I also tried just using newline characters, which didn't work either. I attempted to set other
Authorization properties listed as multi-line, which didn't work either. Any ideas what might be wrong?

The domain_write_permission is designed to be a single domain - it gets incorporated into the key for all records created with that token.  This allows records to be tracked based on their source.


--
 
 



--
Lee Schumacher | Software Engineer | lschu...@google.com | (650) 336-5330

Lee Schumacher

unread,
Sep 17, 2012, 11:21:56 AM9/17/12
to personfinder on behalf of Leif Neve
On Mon, Sep 17, 2012 at 7:48 AM, Lee Schumacher <lschu...@google.com> wrote:



On Mon, Sep 17, 2012 at 7:18 AM, personfinder on behalf of Leif Neve <personfinder+noreply-APn2wQeqoub...@googlegroups.com> wrote:
I am trying to allow multiple domains to write to a subdomain. From tools/console I do:

a =Authorization.get("testpm", "xyz")
a.domain_write_permission = u"""\
pl.nlm.nih.gov
plstage.nlm.nih.gov"""
a.put()

However, when I actually try to set the domain_write_permission, App Engine spits back a BadValueError, saying that it is not a multi-line property.

Thats correct.
 
But if I type help(Authorization), it clearly says in the documentation for domain_write_permission that it is a multi-line property.

Strange, that looks like a bug in the doc string.  The field is defined as a StringProperty(), which defaults to multiline=False.

Actually, thats the generic doc string for StringProperty, so that means a property could be one or the other, but it isn't specific to that particular property. 

 
Maybe it's expecting it in a different format? I also tried just using newline characters, which didn't work either. I attempted to set other
Authorization properties listed as multi-line, which didn't work either. Any ideas what might be wrong?

The domain_write_permission is designed to be a single domain - it gets incorporated into the key for all records created with that token.  This allows records to be tracked based on their source.


--
 
 



--
Lee Schumacher | Software Engineer | lschu...@google.com | (650) 336-5330

Leif Neve

unread,
Sep 17, 2012, 11:51:52 AM9/17/12
to person...@googlegroups.com
Is it possible to have multiple write domains for a single key?

Lee Schumacher

unread,
Sep 17, 2012, 11:56:25 AM9/17/12
to personfinder on behalf of Leif Neve
On Mon, Sep 17, 2012 at 8:51 AM, personfinder on behalf of Leif Neve <personfinder+noreply-APn2wQeqoub...@googlegroups.com> wrote:
Is it possible to have multiple write domains for a single key?


not with the current code and I think its intrinsic to the design of pfif that a domain corresponds to a source repository and vice versa.
 
--
 
 
Reply all
Reply to author
Forward
0 new messages