Show More
@@ -65,8 +65,6 b' def store_update(updates, attr, name):' | |||||
65 | def get_user_or_error(userid): |
|
65 | def get_user_or_error(userid): | |
66 | """ |
|
66 | """ | |
67 | Get user by id or name or return JsonRPCError if not found |
|
67 | Get user by id or name or return JsonRPCError if not found | |
68 |
|
||||
69 | :param userid: |
|
|||
70 | """ |
|
68 | """ | |
71 | user = UserModel().get_user(userid) |
|
69 | user = UserModel().get_user(userid) | |
72 | if user is None: |
|
70 | if user is None: | |
@@ -77,8 +75,6 b' def get_user_or_error(userid):' | |||||
77 | def get_repo_or_error(repoid): |
|
75 | def get_repo_or_error(repoid): | |
78 | """ |
|
76 | """ | |
79 | Get repo by id or name or return JsonRPCError if not found |
|
77 | Get repo by id or name or return JsonRPCError if not found | |
80 |
|
||||
81 | :param repoid: |
|
|||
82 | """ |
|
78 | """ | |
83 | repo = RepoModel().get_repo(repoid) |
|
79 | repo = RepoModel().get_repo(repoid) | |
84 | if repo is None: |
|
80 | if repo is None: | |
@@ -89,8 +85,6 b' def get_repo_or_error(repoid):' | |||||
89 | def get_repo_group_or_error(repogroupid): |
|
85 | def get_repo_group_or_error(repogroupid): | |
90 | """ |
|
86 | """ | |
91 | Get repo group by id or name or return JsonRPCError if not found |
|
87 | Get repo group by id or name or return JsonRPCError if not found | |
92 |
|
||||
93 | :param repogroupid: |
|
|||
94 | """ |
|
88 | """ | |
95 | repo_group = db.RepoGroup.guess_instance(repogroupid) |
|
89 | repo_group = db.RepoGroup.guess_instance(repogroupid) | |
96 | if repo_group is None: |
|
90 | if repo_group is None: | |
@@ -102,8 +96,6 b' def get_repo_group_or_error(repogroupid)' | |||||
102 | def get_user_group_or_error(usergroupid): |
|
96 | def get_user_group_or_error(usergroupid): | |
103 | """ |
|
97 | """ | |
104 | Get user group by id or name or return JsonRPCError if not found |
|
98 | Get user group by id or name or return JsonRPCError if not found | |
105 |
|
||||
106 | :param usergroupid: |
|
|||
107 | """ |
|
99 | """ | |
108 | user_group = UserGroupModel().get_group(usergroupid) |
|
100 | user_group = UserGroupModel().get_group(usergroupid) | |
109 | if user_group is None: |
|
101 | if user_group is None: | |
@@ -114,8 +106,6 b' def get_user_group_or_error(usergroupid)' | |||||
114 | def get_perm_or_error(permid, prefix=None): |
|
106 | def get_perm_or_error(permid, prefix=None): | |
115 | """ |
|
107 | """ | |
116 | Get permission by id or name or return JsonRPCError if not found |
|
108 | Get permission by id or name or return JsonRPCError if not found | |
117 |
|
||||
118 | :param permid: |
|
|||
119 | """ |
|
109 | """ | |
120 | perm = db.Permission.get_by_key(permid) |
|
110 | perm = db.Permission.get_by_key(permid) | |
121 | if perm is None: |
|
111 | if perm is None: | |
@@ -130,8 +120,6 b' def get_perm_or_error(permid, prefix=Non' | |||||
130 | def get_gist_or_error(gistid): |
|
120 | def get_gist_or_error(gistid): | |
131 | """ |
|
121 | """ | |
132 | Get gist by id or gist_access_id or return JsonRPCError if not found |
|
122 | Get gist by id or gist_access_id or return JsonRPCError if not found | |
133 |
|
||||
134 | :param gistid: |
|
|||
135 | """ |
|
123 | """ | |
136 | gist = GistModel().get_gist(gistid) |
|
124 | gist = GistModel().get_gist(gistid) | |
137 | if gist is None: |
|
125 | if gist is None: | |
@@ -165,11 +153,6 b' class ApiController(JSONRPCController):' | |||||
165 | automatically keep remote repos up to date. This command can be executed |
|
153 | automatically keep remote repos up to date. This command can be executed | |
166 | only using api_key belonging to user with admin rights |
|
154 | only using api_key belonging to user with admin rights | |
167 |
|
155 | |||
168 | :param repoid: repository name or repository id |
|
|||
169 | :type repoid: str or int |
|
|||
170 | :param clone_uri: repository URI to pull from (optional) |
|
|||
171 | :type clone_uri: str |
|
|||
172 |
|
||||
173 | OUTPUT:: |
|
156 | OUTPUT:: | |
174 |
|
157 | |||
175 | id : <id_given_in_input> |
|
158 | id : <id_given_in_input> | |
@@ -212,10 +195,6 b' class ApiController(JSONRPCController):' | |||||
212 | aka "clean zombies". This command can be executed only using api_key |
|
195 | aka "clean zombies". This command can be executed only using api_key | |
213 | belonging to user with admin rights. |
|
196 | belonging to user with admin rights. | |
214 |
|
197 | |||
215 | :param remove_obsolete: deletes repositories from |
|
|||
216 | database that are not found on the filesystem |
|
|||
217 | :type remove_obsolete: Optional(bool) |
|
|||
218 |
|
||||
219 | OUTPUT:: |
|
198 | OUTPUT:: | |
220 |
|
199 | |||
221 | id : <id_given_in_input> |
|
200 | id : <id_given_in_input> | |
@@ -250,9 +229,6 b' class ApiController(JSONRPCController):' | |||||
250 | This command can be executed only using api_key belonging to user with admin |
|
229 | This command can be executed only using api_key belonging to user with admin | |
251 | rights or regular user that have write or admin or write access to repository. |
|
230 | rights or regular user that have write or admin or write access to repository. | |
252 |
|
231 | |||
253 | :param repoid: repository name or repository id |
|
|||
254 | :type repoid: str or int |
|
|||
255 |
|
||||
256 | OUTPUT:: |
|
232 | OUTPUT:: | |
257 |
|
233 | |||
258 | id : <id_given_in_input> |
|
234 | id : <id_given_in_input> | |
@@ -296,9 +272,6 b' class ApiController(JSONRPCController):' | |||||
296 | This command can be executed only using api_key belonging to user with |
|
272 | This command can be executed only using api_key belonging to user with | |
297 | admin rights. |
|
273 | admin rights. | |
298 |
|
274 | |||
299 | :param userid: username to show ips for |
|
|||
300 | :type userid: Optional(str or int) |
|
|||
301 |
|
||||
302 | OUTPUT:: |
|
275 | OUTPUT:: | |
303 |
|
276 | |||
304 | id : <id_given_in_input> |
|
277 | id : <id_given_in_input> | |
@@ -354,9 +327,6 b' class ApiController(JSONRPCController):' | |||||
354 | belonging to user with admin rights, or regular users that cannot |
|
327 | belonging to user with admin rights, or regular users that cannot | |
355 | specify different userid than theirs |
|
328 | specify different userid than theirs | |
356 |
|
329 | |||
357 | :param userid: user to get data for |
|
|||
358 | :type userid: Optional(str or int) |
|
|||
359 |
|
||||
360 | OUTPUT:: |
|
330 | OUTPUT:: | |
361 |
|
331 | |||
362 | id : <id_given_in_input> |
|
332 | id : <id_given_in_input> | |
@@ -426,25 +396,6 b' class ApiController(JSONRPCController):' | |||||
426 | Creates new user. Returns new user object. This command can |
|
396 | Creates new user. Returns new user object. This command can | |
427 | be executed only using api_key belonging to user with admin rights. |
|
397 | be executed only using api_key belonging to user with admin rights. | |
428 |
|
398 | |||
429 | :param username: new username |
|
|||
430 | :type username: str or int |
|
|||
431 | :param email: email |
|
|||
432 | :type email: str |
|
|||
433 | :param password: password |
|
|||
434 | :type password: Optional(str) |
|
|||
435 | :param firstname: firstname |
|
|||
436 | :type firstname: str |
|
|||
437 | :param lastname: lastname |
|
|||
438 | :type lastname: str |
|
|||
439 | :param active: active |
|
|||
440 | :type active: Optional(bool) |
|
|||
441 | :param admin: admin |
|
|||
442 | :type admin: Optional(bool) |
|
|||
443 | :param extern_name: name of extern |
|
|||
444 | :type extern_name: Optional(str) |
|
|||
445 | :param extern_type: extern_type |
|
|||
446 | :type extern_type: Optional(str) |
|
|||
447 |
|
||||
448 | OUTPUT:: |
|
399 | OUTPUT:: | |
449 |
|
400 | |||
450 | id : <id_given_in_input> |
|
401 | id : <id_given_in_input> | |
@@ -503,27 +454,6 b' class ApiController(JSONRPCController):' | |||||
503 | updates given user if such user exists. This command can |
|
454 | updates given user if such user exists. This command can | |
504 | be executed only using api_key belonging to user with admin rights. |
|
455 | be executed only using api_key belonging to user with admin rights. | |
505 |
|
456 | |||
506 | :param userid: userid to update |
|
|||
507 | :type userid: str or int |
|
|||
508 | :param username: new username |
|
|||
509 | :type username: Optional(str or int) |
|
|||
510 | :param email: email |
|
|||
511 | :type email: Optional(str) |
|
|||
512 | :param password: password |
|
|||
513 | :type password: Optional(str) |
|
|||
514 | :param firstname: firstname |
|
|||
515 | :type firstname: Optional(str) |
|
|||
516 | :param lastname: lastname |
|
|||
517 | :type lastname: Optional(str) |
|
|||
518 | :param active: active |
|
|||
519 | :type active: Optional(bool) |
|
|||
520 | :param admin: admin |
|
|||
521 | :type admin: Optional(bool) |
|
|||
522 | :param extern_name: |
|
|||
523 | :type extern_name: Optional(str) |
|
|||
524 | :param extern_type: |
|
|||
525 | :type extern_type: Optional(str) |
|
|||
526 |
|
||||
527 | OUTPUT:: |
|
457 | OUTPUT:: | |
528 |
|
458 | |||
529 | id : <id_given_in_input> |
|
459 | id : <id_given_in_input> | |
@@ -577,9 +507,6 b' class ApiController(JSONRPCController):' | |||||
577 | deletes given user if such user exists. This command can |
|
507 | deletes given user if such user exists. This command can | |
578 | be executed only using api_key belonging to user with admin rights. |
|
508 | be executed only using api_key belonging to user with admin rights. | |
579 |
|
509 | |||
580 | :param userid: user to delete |
|
|||
581 | :type userid: str or int |
|
|||
582 |
|
||||
583 | OUTPUT:: |
|
510 | OUTPUT:: | |
584 |
|
511 | |||
585 | id : <id_given_in_input> |
|
512 | id : <id_given_in_input> | |
@@ -619,9 +546,6 b' class ApiController(JSONRPCController):' | |||||
619 | belonging to user with admin rights or user who has at least |
|
546 | belonging to user with admin rights or user who has at least | |
620 | read access to user group. |
|
547 | read access to user group. | |
621 |
|
548 | |||
622 | :param usergroupid: id of user_group to edit |
|
|||
623 | :type usergroupid: str or int |
|
|||
624 |
|
||||
625 | OUTPUT:: |
|
549 | OUTPUT:: | |
626 |
|
550 | |||
627 | id : <id_given_in_input> |
|
551 | id : <id_given_in_input> | |
@@ -670,15 +594,6 b' class ApiController(JSONRPCController):' | |||||
670 | belonging to user with admin rights or an user who has create user group |
|
594 | belonging to user with admin rights or an user who has create user group | |
671 | permission |
|
595 | permission | |
672 |
|
596 | |||
673 | :param group_name: name of new user group |
|
|||
674 | :type group_name: str |
|
|||
675 | :param description: group description |
|
|||
676 | :type description: Optional(str) |
|
|||
677 | :param owner: owner of group. If not passed apiuser is the owner |
|
|||
678 | :type owner: Optional(str or int) |
|
|||
679 | :param active: group is active |
|
|||
680 | :type active: Optional(bool) |
|
|||
681 |
|
||||
682 | OUTPUT:: |
|
597 | OUTPUT:: | |
683 |
|
598 | |||
684 | id : <id_given_in_input> |
|
599 | id : <id_given_in_input> | |
@@ -725,17 +640,6 b' class ApiController(JSONRPCController):' | |||||
725 | Updates given usergroup. This command can be executed only using api_key |
|
640 | Updates given usergroup. This command can be executed only using api_key | |
726 | belonging to user with admin rights or an admin of given user group |
|
641 | belonging to user with admin rights or an admin of given user group | |
727 |
|
642 | |||
728 | :param usergroupid: id of user group to update |
|
|||
729 | :type usergroupid: str or int |
|
|||
730 | :param group_name: name of new user group |
|
|||
731 | :type group_name: str |
|
|||
732 | :param description: group description |
|
|||
733 | :type description: str |
|
|||
734 | :param owner: owner of group. |
|
|||
735 | :type owner: Optional(str or int) |
|
|||
736 | :param active: group is active |
|
|||
737 | :type active: Optional(bool) |
|
|||
738 |
|
||||
739 | OUTPUT:: |
|
643 | OUTPUT:: | |
740 |
|
644 | |||
741 | id : <id_given_in_input> |
|
645 | id : <id_given_in_input> | |
@@ -785,9 +689,6 b' class ApiController(JSONRPCController):' | |||||
785 | This command can be executed only using api_key |
|
689 | This command can be executed only using api_key | |
786 | belonging to user with admin rights or an admin of given user group |
|
690 | belonging to user with admin rights or an admin of given user group | |
787 |
|
691 | |||
788 | :param usergroupid: |
|
|||
789 | :type usergroupid: str or int |
|
|||
790 |
|
||||
791 | OUTPUT:: |
|
692 | OUTPUT:: | |
792 |
|
693 | |||
793 | id : <id_given_in_input> |
|
694 | id : <id_given_in_input> | |
@@ -836,11 +737,6 b' class ApiController(JSONRPCController):' | |||||
836 | `false`. This command can be executed only using api_key |
|
737 | `false`. This command can be executed only using api_key | |
837 | belonging to user with admin rights or an admin of a given user group |
|
738 | belonging to user with admin rights or an admin of a given user group | |
838 |
|
739 | |||
839 | :param usergroupid: |
|
|||
840 | :type usergroupid: str or int |
|
|||
841 | :param userid: |
|
|||
842 | :type userid: str or int |
|
|||
843 |
|
||||
844 | OUTPUT:: |
|
740 | OUTPUT:: | |
845 |
|
741 | |||
846 | id : <id_given_in_input> |
|
742 | id : <id_given_in_input> | |
@@ -893,9 +789,6 b' class ApiController(JSONRPCController):' | |||||
893 | be `false`. This command can be executed only |
|
789 | be `false`. This command can be executed only | |
894 | using api_key belonging to user with admin rights or an admin of given user group |
|
790 | using api_key belonging to user with admin rights or an admin of given user group | |
895 |
|
791 | |||
896 | :param usergroupid: |
|
|||
897 | :param userid: |
|
|||
898 |
|
||||
899 | OUTPUT:: |
|
792 | OUTPUT:: | |
900 |
|
793 | |||
901 | id : <id_given_in_input> |
|
794 | id : <id_given_in_input> | |
@@ -938,9 +831,6 b' class ApiController(JSONRPCController):' | |||||
938 | executed only using api_key belonging to user with admin |
|
831 | executed only using api_key belonging to user with admin | |
939 | rights or regular user that have at least read access to repository. |
|
832 | rights or regular user that have at least read access to repository. | |
940 |
|
833 | |||
941 | :param repoid: repository name or repository id |
|
|||
942 | :type repoid: str or int |
|
|||
943 |
|
||||
944 | OUTPUT:: |
|
834 | OUTPUT:: | |
945 |
|
835 | |||
946 | id : <id_given_in_input> |
|
836 | id : <id_given_in_input> | |
@@ -1082,15 +972,6 b' class ApiController(JSONRPCController):' | |||||
1082 | `dirs`. This command can be executed only using api_key belonging to |
|
972 | `dirs`. This command can be executed only using api_key belonging to | |
1083 | user with admin rights or regular user that have at least read access to repository. |
|
973 | user with admin rights or regular user that have at least read access to repository. | |
1084 |
|
974 | |||
1085 | :param repoid: repository name or repository id |
|
|||
1086 | :type repoid: str or int |
|
|||
1087 | :param revision: revision for which listing should be done |
|
|||
1088 | :type revision: str |
|
|||
1089 | :param root_path: path from which start displaying |
|
|||
1090 | :type root_path: str |
|
|||
1091 | :param ret_type: return type 'all|files|dirs' nodes |
|
|||
1092 | :type ret_type: Optional(str) |
|
|||
1093 |
|
||||
1094 | OUTPUT:: |
|
975 | OUTPUT:: | |
1095 |
|
976 | |||
1096 | id : <id_given_in_input> |
|
977 | id : <id_given_in_input> | |
@@ -1144,28 +1025,6 b' class ApiController(JSONRPCController):' | |||||
1144 | belonging to user with admin rights or regular user that have create |
|
1025 | belonging to user with admin rights or regular user that have create | |
1145 | repository permission. Regular users cannot specify owner parameter |
|
1026 | repository permission. Regular users cannot specify owner parameter | |
1146 |
|
1027 | |||
1147 | :param repo_name: repository name |
|
|||
1148 | :type repo_name: str |
|
|||
1149 | :param owner: user_id or username |
|
|||
1150 | :type owner: Optional(str) |
|
|||
1151 | :param repo_type: 'hg' or 'git' |
|
|||
1152 | :type repo_type: Optional(str) |
|
|||
1153 | :param description: repository description |
|
|||
1154 | :type description: Optional(str) |
|
|||
1155 | :param private: |
|
|||
1156 | :type private: bool |
|
|||
1157 | :param clone_uri: |
|
|||
1158 | :type clone_uri: str |
|
|||
1159 | :param landing_rev: <rev_type>:<rev> |
|
|||
1160 | :type landing_rev: str |
|
|||
1161 | :param enable_downloads: |
|
|||
1162 | :type enable_downloads: bool |
|
|||
1163 | :param enable_statistics: |
|
|||
1164 | :type enable_statistics: bool |
|
|||
1165 | :param copy_permissions: Copy permission from group that repository is |
|
|||
1166 | being created. |
|
|||
1167 | :type copy_permissions: bool |
|
|||
1168 |
|
||||
1169 | OUTPUT:: |
|
1028 | OUTPUT:: | |
1170 |
|
1029 | |||
1171 | id : <id_given_in_input> |
|
1030 | id : <id_given_in_input> | |
@@ -1257,18 +1116,6 b' class ApiController(JSONRPCController):' | |||||
1257 | enable_downloads=None): |
|
1116 | enable_downloads=None): | |
1258 | """ |
|
1117 | """ | |
1259 | Updates repo |
|
1118 | Updates repo | |
1260 |
|
||||
1261 | :param repoid: repository name or repository id |
|
|||
1262 | :type repoid: str or int |
|
|||
1263 | :param name: |
|
|||
1264 | :param owner: |
|
|||
1265 | :param group: |
|
|||
1266 | :param description: |
|
|||
1267 | :param private: |
|
|||
1268 | :param clone_uri: |
|
|||
1269 | :param landing_rev: |
|
|||
1270 | :param enable_statistics: |
|
|||
1271 | :param enable_downloads: |
|
|||
1272 | """ |
|
1119 | """ | |
1273 | repo = get_repo_or_error(repoid) |
|
1120 | repo = get_repo_or_error(repoid) | |
1274 | if not HasPermissionAny('hg.admin')(): |
|
1121 | if not HasPermissionAny('hg.admin')(): | |
@@ -1328,15 +1175,6 b' class ApiController(JSONRPCController):' | |||||
1328 | user with admin rights or regular user that have fork permission, and at least |
|
1175 | user with admin rights or regular user that have fork permission, and at least | |
1329 | read access to forking repository. Regular users cannot specify owner parameter. |
|
1176 | read access to forking repository. Regular users cannot specify owner parameter. | |
1330 |
|
1177 | |||
1331 | :param repoid: repository name or repository id |
|
|||
1332 | :type repoid: str or int |
|
|||
1333 | :param fork_name: |
|
|||
1334 | :param owner: |
|
|||
1335 | :param description: |
|
|||
1336 | :param copy_permissions: |
|
|||
1337 | :param private: |
|
|||
1338 | :param landing_rev: |
|
|||
1339 |
|
||||
1340 | INPUT:: |
|
1178 | INPUT:: | |
1341 |
|
1179 | |||
1342 | id : <id_for_response> |
|
1180 | id : <id_for_response> | |
@@ -1434,11 +1272,6 b' class ApiController(JSONRPCController):' | |||||
1434 | When `forks` param is set it's possible to detach or delete forks of deleting |
|
1272 | When `forks` param is set it's possible to detach or delete forks of deleting | |
1435 | repository |
|
1273 | repository | |
1436 |
|
1274 | |||
1437 | :param repoid: repository name or repository id |
|
|||
1438 | :type repoid: str or int |
|
|||
1439 | :param forks: `detach` or `delete`, what do do with attached forks for repo |
|
|||
1440 | :type forks: Optional(str) |
|
|||
1441 |
|
||||
1442 | OUTPUT:: |
|
1275 | OUTPUT:: | |
1443 |
|
1276 | |||
1444 | id : <id_given_in_input> |
|
1277 | id : <id_given_in_input> | |
@@ -1487,12 +1320,6 b' class ApiController(JSONRPCController):' | |||||
1487 | if found. This command can be executed only using api_key belonging to user |
|
1320 | if found. This command can be executed only using api_key belonging to user | |
1488 | with admin rights. |
|
1321 | with admin rights. | |
1489 |
|
1322 | |||
1490 | :param repoid: repository name or repository id |
|
|||
1491 | :type repoid: str or int |
|
|||
1492 | :param userid: |
|
|||
1493 | :param perm: (repository.(none|read|write|admin)) |
|
|||
1494 | :type perm: str |
|
|||
1495 |
|
||||
1496 | OUTPUT:: |
|
1323 | OUTPUT:: | |
1497 |
|
1324 | |||
1498 | id : <id_given_in_input> |
|
1325 | id : <id_given_in_input> | |
@@ -1531,10 +1358,6 b' class ApiController(JSONRPCController):' | |||||
1531 | Revoke permission for user on given repository. This command can be executed |
|
1358 | Revoke permission for user on given repository. This command can be executed | |
1532 | only using api_key belonging to user with admin rights. |
|
1359 | only using api_key belonging to user with admin rights. | |
1533 |
|
1360 | |||
1534 | :param repoid: repository name or repository id |
|
|||
1535 | :type repoid: str or int |
|
|||
1536 | :param userid: |
|
|||
1537 |
|
||||
1538 | OUTPUT:: |
|
1361 | OUTPUT:: | |
1539 |
|
1362 | |||
1540 | id : <id_given_in_input> |
|
1363 | id : <id_given_in_input> | |
@@ -1570,13 +1393,6 b' class ApiController(JSONRPCController):' | |||||
1570 | existing one if found. This command can be executed only using |
|
1393 | existing one if found. This command can be executed only using | |
1571 | api_key belonging to user with admin rights. |
|
1394 | api_key belonging to user with admin rights. | |
1572 |
|
1395 | |||
1573 | :param repoid: repository name or repository id |
|
|||
1574 | :type repoid: str or int |
|
|||
1575 | :param usergroupid: id of usergroup |
|
|||
1576 | :type usergroupid: str or int |
|
|||
1577 | :param perm: (repository.(none|read|write|admin)) |
|
|||
1578 | :type perm: str |
|
|||
1579 |
|
||||
1580 | OUTPUT:: |
|
1396 | OUTPUT:: | |
1581 |
|
1397 | |||
1582 | id : <id_given_in_input> |
|
1398 | id : <id_given_in_input> | |
@@ -1632,10 +1448,6 b' class ApiController(JSONRPCController):' | |||||
1632 | Revoke permission for user group on given repository. This command can be |
|
1448 | Revoke permission for user group on given repository. This command can be | |
1633 | executed only using api_key belonging to user with admin rights. |
|
1449 | executed only using api_key belonging to user with admin rights. | |
1634 |
|
1450 | |||
1635 | :param repoid: repository name or repository id |
|
|||
1636 | :type repoid: str or int |
|
|||
1637 | :param usergroupid: |
|
|||
1638 |
|
||||
1639 | OUTPUT:: |
|
1451 | OUTPUT:: | |
1640 |
|
1452 | |||
1641 | id : <id_given_in_input> |
|
1453 | id : <id_given_in_input> | |
@@ -1679,9 +1491,6 b' class ApiController(JSONRPCController):' | |||||
1679 | """ |
|
1491 | """ | |
1680 | Returns given repo group together with permissions, and repositories |
|
1492 | Returns given repo group together with permissions, and repositories | |
1681 | inside the group |
|
1493 | inside the group | |
1682 |
|
||||
1683 | :param repogroupid: id/name of repository group |
|
|||
1684 | :type repogroupid: str or int |
|
|||
1685 | """ |
|
1494 | """ | |
1686 | repo_group = get_repo_group_or_error(repogroupid) |
|
1495 | repo_group = get_repo_group_or_error(repogroupid) | |
1687 |
|
1496 | |||
@@ -1729,17 +1538,6 b' class ApiController(JSONRPCController):' | |||||
1729 | Creates a repository group. This command can be executed only using |
|
1538 | Creates a repository group. This command can be executed only using | |
1730 | api_key belonging to user with admin rights. |
|
1539 | api_key belonging to user with admin rights. | |
1731 |
|
1540 | |||
1732 | :param group_name: |
|
|||
1733 | :type group_name: |
|
|||
1734 | :param description: |
|
|||
1735 | :type description: |
|
|||
1736 | :param owner: |
|
|||
1737 | :type owner: |
|
|||
1738 | :param parent: |
|
|||
1739 | :type parent: |
|
|||
1740 | :param copy_permissions: |
|
|||
1741 | :type copy_permissions: |
|
|||
1742 |
|
||||
1743 | OUTPUT:: |
|
1541 | OUTPUT:: | |
1744 |
|
1542 | |||
1745 | id : <id_given_in_input> |
|
1543 | id : <id_given_in_input> | |
@@ -1814,9 +1612,6 b' class ApiController(JSONRPCController):' | |||||
1814 | @HasPermissionAnyDecorator('hg.admin') |
|
1612 | @HasPermissionAnyDecorator('hg.admin') | |
1815 | def delete_repo_group(self, repogroupid): |
|
1613 | def delete_repo_group(self, repogroupid): | |
1816 | """ |
|
1614 | """ | |
1817 | :param repogroupid: name or id of repository group |
|
|||
1818 | :type repogroupid: str or int |
|
|||
1819 |
|
||||
1820 | OUTPUT:: |
|
1615 | OUTPUT:: | |
1821 |
|
1616 | |||
1822 | id : <id_given_in_input> |
|
1617 | id : <id_given_in_input> | |
@@ -1859,14 +1654,6 b' class ApiController(JSONRPCController):' | |||||
1859 | to user with admin rights, or user who has admin right to given repository |
|
1654 | to user with admin rights, or user who has admin right to given repository | |
1860 | group. |
|
1655 | group. | |
1861 |
|
1656 | |||
1862 | :param repogroupid: name or id of repository group |
|
|||
1863 | :type repogroupid: str or int |
|
|||
1864 | :param userid: |
|
|||
1865 | :param perm: (group.(none|read|write|admin)) |
|
|||
1866 | :type perm: str |
|
|||
1867 | :param apply_to_children: 'none', 'repos', 'groups', 'all' |
|
|||
1868 | :type apply_to_children: str |
|
|||
1869 |
|
||||
1870 | OUTPUT:: |
|
1657 | OUTPUT:: | |
1871 |
|
1658 | |||
1872 | id : <id_given_in_input> |
|
1659 | id : <id_given_in_input> | |
@@ -1920,13 +1707,6 b' class ApiController(JSONRPCController):' | |||||
1920 | be executed only using api_key belonging to user with admin rights, or |
|
1707 | be executed only using api_key belonging to user with admin rights, or | |
1921 | user who has admin right to given repository group. |
|
1708 | user who has admin right to given repository group. | |
1922 |
|
1709 | |||
1923 | :param repogroupid: name or id of repository group |
|
|||
1924 | :type repogroupid: str or int |
|
|||
1925 | :param userid: |
|
|||
1926 | :type userid: |
|
|||
1927 | :param apply_to_children: 'none', 'repos', 'groups', 'all' |
|
|||
1928 | :type apply_to_children: str |
|
|||
1929 |
|
||||
1930 | OUTPUT:: |
|
1710 | OUTPUT:: | |
1931 |
|
1711 | |||
1932 | id : <id_given_in_input> |
|
1712 | id : <id_given_in_input> | |
@@ -1981,15 +1761,6 b' class ApiController(JSONRPCController):' | |||||
1981 | api_key belonging to user with admin rights, or user who has admin |
|
1761 | api_key belonging to user with admin rights, or user who has admin | |
1982 | right to given repository group. |
|
1762 | right to given repository group. | |
1983 |
|
1763 | |||
1984 | :param repogroupid: name or id of repository group |
|
|||
1985 | :type repogroupid: str or int |
|
|||
1986 | :param usergroupid: id of usergroup |
|
|||
1987 | :type usergroupid: str or int |
|
|||
1988 | :param perm: (group.(none|read|write|admin)) |
|
|||
1989 | :type perm: str |
|
|||
1990 | :param apply_to_children: 'none', 'repos', 'groups', 'all' |
|
|||
1991 | :type apply_to_children: str |
|
|||
1992 |
|
||||
1993 | OUTPUT:: |
|
1764 | OUTPUT:: | |
1994 |
|
1765 | |||
1995 | id : <id_given_in_input> |
|
1766 | id : <id_given_in_input> | |
@@ -2051,12 +1822,6 b' class ApiController(JSONRPCController):' | |||||
2051 | executed only using api_key belonging to user with admin rights, or |
|
1822 | executed only using api_key belonging to user with admin rights, or | |
2052 | user who has admin right to given repository group. |
|
1823 | user who has admin right to given repository group. | |
2053 |
|
1824 | |||
2054 | :param repogroupid: name or id of repository group |
|
|||
2055 | :type repogroupid: str or int |
|
|||
2056 | :param usergroupid: |
|
|||
2057 | :param apply_to_children: 'none', 'repos', 'groups', 'all' |
|
|||
2058 | :type apply_to_children: str |
|
|||
2059 |
|
||||
2060 | OUTPUT:: |
|
1825 | OUTPUT:: | |
2061 |
|
1826 | |||
2062 | id : <id_given_in_input> |
|
1827 | id : <id_given_in_input> | |
@@ -2108,9 +1873,6 b' class ApiController(JSONRPCController):' | |||||
2108 | def get_gist(self, gistid): |
|
1873 | def get_gist(self, gistid): | |
2109 | """ |
|
1874 | """ | |
2110 | Get given gist by id |
|
1875 | Get given gist by id | |
2111 |
|
||||
2112 | :param gistid: id of private or public gist |
|
|||
2113 | :type gistid: str |
|
|||
2114 | """ |
|
1876 | """ | |
2115 | gist = get_gist_or_error(gistid) |
|
1877 | gist = get_gist_or_error(gistid) | |
2116 | if not HasPermissionAny('hg.admin')(): |
|
1878 | if not HasPermissionAny('hg.admin')(): | |
@@ -2122,9 +1884,6 b' class ApiController(JSONRPCController):' | |||||
2122 | """ |
|
1884 | """ | |
2123 | Get all gists for given user. If userid is empty returned gists |
|
1885 | Get all gists for given user. If userid is empty returned gists | |
2124 | are for user who called the api |
|
1886 | are for user who called the api | |
2125 |
|
||||
2126 | :param userid: user to get gists for |
|
|||
2127 | :type userid: Optional(str or int) |
|
|||
2128 | """ |
|
1887 | """ | |
2129 | if not HasPermissionAny('hg.admin')(): |
|
1888 | if not HasPermissionAny('hg.admin')(): | |
2130 | # make sure normal user does not pass someone else userid, |
|
1889 | # make sure normal user does not pass someone else userid, | |
@@ -2153,19 +1912,6 b' class ApiController(JSONRPCController):' | |||||
2153 | """ |
|
1912 | """ | |
2154 | Creates new Gist |
|
1913 | Creates new Gist | |
2155 |
|
1914 | |||
2156 | :param files: files to be added to gist |
|
|||
2157 | {'filename': {'content':'...', 'lexer': null}, |
|
|||
2158 | 'filename2': {'content':'...', 'lexer': null}} |
|
|||
2159 | :type files: dict |
|
|||
2160 | :param owner: gist owner, defaults to api method caller |
|
|||
2161 | :type owner: Optional(str or int) |
|
|||
2162 | :param gist_type: type of gist 'public' or 'private' |
|
|||
2163 | :type gist_type: Optional(str) |
|
|||
2164 | :param lifetime: time in minutes of gist lifetime |
|
|||
2165 | :type lifetime: Optional(int) |
|
|||
2166 | :param description: gist description |
|
|||
2167 | :type description: str |
|
|||
2168 |
|
||||
2169 | OUTPUT:: |
|
1915 | OUTPUT:: | |
2170 |
|
1916 | |||
2171 | id : <id_given_in_input> |
|
1917 | id : <id_given_in_input> | |
@@ -2209,9 +1955,6 b' class ApiController(JSONRPCController):' | |||||
2209 | """ |
|
1955 | """ | |
2210 | Deletes existing gist |
|
1956 | Deletes existing gist | |
2211 |
|
1957 | |||
2212 | :param gistid: id of gist to delete |
|
|||
2213 | :type gistid: str |
|
|||
2214 |
|
||||
2215 | OUTPUT:: |
|
1958 | OUTPUT:: | |
2216 |
|
1959 | |||
2217 | id : <id_given_in_input> |
|
1960 | id : <id_given_in_input> |
General Comments 0
You need to be logged in to leave comments.
Login now