summaryrefslogtreecommitdiff
path: root/common/src/leap/soledad
diff options
context:
space:
mode:
authorVictor Shyba <victor.shyba@gmail.com>2015-12-22 19:50:48 -0300
committerVictor Shyba <victor.shyba@gmail.com>2015-12-22 19:50:48 -0300
commit888d3d532770cb06fbc575088dc3e27edff8d703 (patch)
treec1216a6e8d6f06173b886efff00463b857cf543d /common/src/leap/soledad
parentda58f335596c856dee21e2ad014717912e4206d3 (diff)
[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
Diffstat (limited to 'common/src/leap/soledad')
-rw-r--r--common/src/leap/soledad/common/couch/__init__.py16
1 files changed, 14 insertions, 2 deletions
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]