444
444
>>> recipe.lp_save()
445
445
>>> recipe == recipe_2
448
Server-side permissions
449
-----------------------
451
The server may hide some data from you because you lack the permission
452
to see it. To avoid objects that are mysteriously missing fields, the
453
server will serve a special "redacted" value that lets you know you
454
don't have permission to see the data.
456
>>> from lazr.restfulclient.tests.example import CookbookWebServiceClient
457
>>> service = CookbookWebServiceClient()
459
>>> cookbook = service.recipes[1].cookbook
460
>>> print cookbook.confirmed
461
tag:launchpad.net:2008:redacted
463
If you try to make an HTTP request for the "redacted" value (usually
464
by following a link that you don't know is redacted), you'll get a
467
>>> service.load("tag:launchpad.net:2008:redacted")
468
Traceback (most recent call last):
470
ValueError: You tried to access a resource that you don't have the
471
server-side permission to see.