Part of lp.services.librarianserver.db View In Hierarchy
Method | __init__ | Create a new database access object. |
Method | lookupBySHA1 | Undocumented |
Method | getAlias | Returns a LibraryFileAlias, or raises LookupError. |
Method | getAliases | Undocumented |
Method | add | Undocumented |
Method | addAlias | Add an alias, and return its ID. |
Method | _verifyMacaroon | Verify an LFA-authorising macaroon with the authserver. |
Parameters | restricted | If this is set to true, only restricted will be served. Otherwise only public files will be served. Files created in this library will marked as restricted. |
This must be called in the reactor thread.
Parameters | macaroon | A Macaroon . |
aliasid | A LibraryFileAlias ID. | |
Returns | True if the authserver reports that macaroon authorises
access to aliasid ; False if it reports that it does not. | |
Raises | Fault | if the authserver request fails. |
A LookupError is raised if no record with the given ID exists or if not related LibraryFileContent exists.
Parameters | aliasid | A LibraryFileAlias ID. |
token | The token for the file. If None no token is present. When a token is supplied, it is looked up with path. | |
path | The path the request is for, unused unless a token is supplied; when supplied it must match the token. The value of path is expected to be that from a twisted request.args e.g. /foo/bar. |