From 888d3d532770cb06fbc575088dc3e27edff8d703 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Tue, 22 Dec 2015 19:50:48 -0300 Subject: [docs] incomplete doc for security config parameter database_security parameter was either undocumented or incomplete. This commit adds a few more doc to make it consistent with latest changes. Closes #7689 --- common/src/leap/soledad/common/couch/__init__.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'common/src/leap') diff --git a/common/src/leap/soledad/common/couch/__init__.py b/common/src/leap/soledad/common/couch/__init__.py index dae460cb..18ed8a19 100644 --- a/common/src/leap/soledad/common/couch/__init__.py +++ b/common/src/leap/soledad/common/couch/__init__.py @@ -123,6 +123,8 @@ class CouchDatabase(object): :type replica_uid: str :param ensure_ddocs: Ensure that the design docs exist on server. :type ensure_ddocs: bool + :param database_security: security rules as CouchDB security doc + :type database_security: dict :return: the database instance :rtype: SoledadBackend @@ -149,6 +151,16 @@ class CouchDatabase(object): def __init__(self, url, dbname, ensure_ddocs=True, database_security=None): + """ + :param url: Couch server URL with necessary credentials + :type url: string + :param dbname: Couch database name + :type dbname: string + :param ensure_ddocs: Ensure that the design docs exist on server. + :type ensure_ddocs: bool + :param database_security: security rules as CouchDB security doc + :type database_security: dict + """ self._session = Session(timeout=COUCH_TIMEOUT) self._url = url self._dbname = dbname @@ -218,8 +230,8 @@ class CouchDatabase(object): This is achieved by creating a _security design document, see: http://docs.couchdb.org/en/latest/api/database/security.html - :param database_security: security configuration parsed from conf file - :type cache: dict + :param security_config: security configuration parsed from conf file + :type security_config: dict """ security_config = security_config or {} security = self._database.resource.get_json('_security')[2] -- cgit v1.2.3