aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Kuzminski <marcin@python-works.com>2012-03-20 23:26:02 +0200
committerMarcin Kuzminski <marcin@python-works.com>2012-03-20 23:26:02 +0200
commitd07a030263b84b26f5550a122ea7921c9824d833 (patch)
tree7f6b614a269ff13b6841268e5c0094ebe2a5bb50
parent5630c5d51cd6a327c8333ae4629566d86ac0395c (diff)
Api docs fixes
- return proper type instead of type_ - members return now also a type user or users_group --HG-- branch : beta
-rwxr-xr-xREADME.rst2
-rw-r--r--docs/api/api.rst10
-rw-r--r--rhodecode/controllers/api/api.py6
3 files changed, 11 insertions, 7 deletions
diff --git a/README.rst b/README.rst
index fce42706..d5562fc3 100755
--- a/README.rst
+++ b/README.rst
@@ -100,7 +100,7 @@ RhodeCode Features
- Intelligent cache with invalidation after push or project change, provides
high performance and always up to date data.
- Rss / atom feeds, gravatar support, download sources as zip/tar/gz
-- Async tasks for speed and performance using celery_ (works without them too)
+- Optional async tasks for speed and performance using celery_
- Backup scripts can do backup of whole app and send it over scp to desired
location
- Based on pylons / sqlalchemy / sqlite / whoosh / vcs
diff --git a/docs/api/api.rst b/docs/api/api.rst
index 8c99bc74..fc341f08 100644
--- a/docs/api/api.rst
+++ b/docs/api/api.rst
@@ -380,7 +380,8 @@ OUTPUT::
get_repo
--------
-Gets an existing repository by it's name or repository_id. This command can
+Gets an existing repository by it's name or repository_id. Members will return
+either users_group or user associated to that repository. This command can
be executed only using api_key belonging to user with admin rights.
@@ -402,7 +403,9 @@ OUTPUT::
"type" : "<type>",
"description" : "<description>",
"members" : [
- { "id" : "<userid>",
+ {
+ "type": "user",
+ "id" : "<userid>",
"username" : "<username>",
"firstname": "<firstname>",
"lastname" : "<lastname>",
@@ -413,7 +416,8 @@ OUTPUT::
"permission" : "repository.(read|write|admin)"
},
- {
+ {
+ "type": "users_group",
"id" : "<usersgroupid>",
"name" : "<usersgroupname>",
"active": "<bool>",
diff --git a/rhodecode/controllers/api/api.py b/rhodecode/controllers/api/api.py
index 3cfd3669..80e1f1a3 100644
--- a/rhodecode/controllers/api/api.py
+++ b/rhodecode/controllers/api/api.py
@@ -283,7 +283,7 @@ class ApiController(JSONRPCController):
@HasPermissionAllDecorator('hg.admin')
def add_user_to_users_group(self, apiuser, group_name, username):
""""
- Add a user to a group
+ Add a user to a users group
:param apiuser:
:param group_name:
@@ -361,7 +361,7 @@ class ApiController(JSONRPCController):
user = user.user
members.append(
dict(
- type_="user",
+ type="user",
id=user.user_id,
username=user.username,
firstname=user.name,
@@ -378,7 +378,7 @@ class ApiController(JSONRPCController):
users_group = users_group.users_group
members.append(
dict(
- type_="users_group",
+ type="users_group",
id=users_group.users_group_id,
name=users_group.users_group_name,
active=users_group.users_group_active,