diff docs/api/api.rst @ 1878:631caf880b87 beta

implements #329 - api function for adding a users_group into repo - fixed found issues on API with missing params detection - updated docs for api
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 21 Dec 2011 01:53:01 +0200
parents fee9895fa46e
children 203af05539e0
line wrap: on
line diff
--- a/docs/api/api.rst	Mon Dec 19 19:53:08 2011 +0200
+++ b/docs/api/api.rst	Wed Dec 21 01:53:01 2011 +0200
@@ -223,8 +223,8 @@
             }
     error:  null
 
-add_user_to_users_groups
-------------------------
+add_user_to_users_group
+-----------------------
 
 Adds a user to a users group. This command can be executed only using api_key
 belonging to user with admin rights
@@ -302,14 +302,14 @@
 	                                "active" :     "<bool>",
 	                                "admin" :      "<bool>",
 	                                "ldap" :       "<ldap_dn>",
-	                                "permission" : "repository_(read|write|admin)"
+	                                "permission" : "repository.(read|write|admin)"
 	                              },

                                   {
                                     "id" :       "<usersgroupid>",
                                     "name" :     "<usersgroupname>",
                                     "active":    "<bool>",
-                                    "permission" : "repository_(read|write|admin)"
+                                    "permission" : "repository.(read|write|admin)"
                                   },

                                 ]
@@ -356,10 +356,27 @@
     args:     {
                 "repo_name" :  "<reponame>",
                 "user_name" :  "<username>",
-                "perm" :       "(None|repository_(read|write|admin))",
+                "perm" :       "(None|repository.(read|write|admin))",
               }
 
 OUTPUT::
 
     result: None
     error:  null
+
+add_users_group_to_repo
+-----------------------
+
+Add a users group to a repository. This command can be executed only using 
+api_key belonging to user with admin rights. If "perm" is None, group will 
+be removed from the repository.
+
+INPUT::
+
+    api_key : "<api_key>"
+    method :  "add_users_group_to_repo"
+    args:     {
+                "repo_name" :  "<reponame>",
+                "group_name" :  "<groupname>",
+                "perm" :       "(None|repository.(read|write|admin))",
+              }
\ No newline at end of file