Show More
@@ -161,14 +161,6 b' class ApiController(JSONRPCController):' | |||||
161 | "repository" : "<repository name>" |
|
161 | "repository" : "<repository name>" | |
162 | } |
|
162 | } | |
163 | error : null |
|
163 | error : null | |
164 |
|
||||
165 | ERROR OUTPUT:: |
|
|||
166 |
|
||||
167 | id : <id_given_in_input> |
|
|||
168 | result : null |
|
|||
169 | error : { |
|
|||
170 | "Unable to pull changes from `<reponame>`" |
|
|||
171 | } |
|
|||
172 | """ |
|
164 | """ | |
173 | repo = get_repo_or_error(repoid) |
|
165 | repo = get_repo_or_error(repoid) | |
174 |
|
166 | |||
@@ -203,14 +195,6 b' class ApiController(JSONRPCController):' | |||||
203 | 'removed': [<removed repository name>,...] |
|
195 | 'removed': [<removed repository name>,...] | |
204 | } |
|
196 | } | |
205 | error : null |
|
197 | error : null | |
206 |
|
||||
207 | ERROR OUTPUT:: |
|
|||
208 |
|
||||
209 | id : <id_given_in_input> |
|
|||
210 | result : null |
|
|||
211 | error : { |
|
|||
212 | 'Error occurred during rescan repositories action' |
|
|||
213 | } |
|
|||
214 | """ |
|
198 | """ | |
215 | try: |
|
199 | try: | |
216 | rm_obsolete = remove_obsolete |
|
200 | rm_obsolete = remove_obsolete | |
@@ -237,14 +221,6 b' class ApiController(JSONRPCController):' | |||||
237 | 'repository': <repository name> |
|
221 | 'repository': <repository name> | |
238 | } |
|
222 | } | |
239 | error : null |
|
223 | error : null | |
240 |
|
||||
241 | ERROR OUTPUT:: |
|
|||
242 |
|
||||
243 | id : <id_given_in_input> |
|
|||
244 | result : null |
|
|||
245 | error : { |
|
|||
246 | 'Error occurred during cache invalidation action' |
|
|||
247 | } |
|
|||
248 | """ |
|
224 | """ | |
249 | repo = get_repo_or_error(repoid) |
|
225 | repo = get_repo_or_error(repoid) | |
250 | if not HasPermissionAny('hg.admin')(): |
|
226 | if not HasPermissionAny('hg.admin')(): | |
@@ -404,18 +380,6 b' class ApiController(JSONRPCController):' | |||||
404 | "user" : <user_obj> |
|
380 | "user" : <user_obj> | |
405 | } |
|
381 | } | |
406 | error : null |
|
382 | error : null | |
407 |
|
||||
408 | ERROR OUTPUT:: |
|
|||
409 |
|
||||
410 | id : <id_given_in_input> |
|
|||
411 | result : null |
|
|||
412 | error : { |
|
|||
413 | "user `<username>` already exist" |
|
|||
414 | or |
|
|||
415 | "email `<email>` already exist" |
|
|||
416 | or |
|
|||
417 | "failed to create user `<username>`" |
|
|||
418 | } |
|
|||
419 | """ |
|
383 | """ | |
420 | if db.User.get_by_username(username): |
|
384 | if db.User.get_by_username(username): | |
421 | raise JSONRPCError("user `%s` already exist" % (username,)) |
|
385 | raise JSONRPCError("user `%s` already exist" % (username,)) | |
@@ -462,14 +426,6 b' class ApiController(JSONRPCController):' | |||||
462 | "user" : <user_object> |
|
426 | "user" : <user_object> | |
463 | } |
|
427 | } | |
464 | error : null |
|
428 | error : null | |
465 |
|
||||
466 | ERROR OUTPUT:: |
|
|||
467 |
|
||||
468 | id : <id_given_in_input> |
|
|||
469 | result : null |
|
|||
470 | error : { |
|
|||
471 | "failed to update user `<username>`" |
|
|||
472 | } |
|
|||
473 | """ |
|
429 | """ | |
474 | user = get_user_or_error(userid) |
|
430 | user = get_user_or_error(userid) | |
475 |
|
431 | |||
@@ -515,14 +471,6 b' class ApiController(JSONRPCController):' | |||||
515 | "user" : null |
|
471 | "user" : null | |
516 | } |
|
472 | } | |
517 | error : null |
|
473 | error : null | |
518 |
|
||||
519 | ERROR OUTPUT:: |
|
|||
520 |
|
||||
521 | id : <id_given_in_input> |
|
|||
522 | result : null |
|
|||
523 | error : { |
|
|||
524 | "failed to delete user ID:<userid> <username>" |
|
|||
525 | } |
|
|||
526 | """ |
|
474 | """ | |
527 | user = get_user_or_error(userid) |
|
475 | user = get_user_or_error(userid) | |
528 |
|
476 | |||
@@ -602,16 +550,6 b' class ApiController(JSONRPCController):' | |||||
602 | "user_group" : <user_group_object> |
|
550 | "user_group" : <user_group_object> | |
603 | } |
|
551 | } | |
604 | error : null |
|
552 | error : null | |
605 |
|
||||
606 | ERROR OUTPUT:: |
|
|||
607 |
|
||||
608 | id : <id_given_in_input> |
|
|||
609 | result : null |
|
|||
610 | error : { |
|
|||
611 | "user group `<group name>` already exist" |
|
|||
612 | or |
|
|||
613 | "failed to create group `<group name>`" |
|
|||
614 | } |
|
|||
615 | """ |
|
553 | """ | |
616 | if UserGroupModel().get_by_name(group_name): |
|
554 | if UserGroupModel().get_by_name(group_name): | |
617 | raise JSONRPCError("user group `%s` already exist" % (group_name,)) |
|
555 | raise JSONRPCError("user group `%s` already exist" % (group_name,)) | |
@@ -648,14 +586,6 b' class ApiController(JSONRPCController):' | |||||
648 | "user_group" : <user_group_object> |
|
586 | "user_group" : <user_group_object> | |
649 | } |
|
587 | } | |
650 | error : null |
|
588 | error : null | |
651 |
|
||||
652 | ERROR OUTPUT:: |
|
|||
653 |
|
||||
654 | id : <id_given_in_input> |
|
|||
655 | result : null |
|
|||
656 | error : { |
|
|||
657 | "failed to update user group `<user group name>`" |
|
|||
658 | } |
|
|||
659 | """ |
|
589 | """ | |
660 | user_group = get_user_group_or_error(usergroupid) |
|
590 | user_group = get_user_group_or_error(usergroupid) | |
661 | if not HasPermissionAny('hg.admin')(): |
|
591 | if not HasPermissionAny('hg.admin')(): | |
@@ -696,16 +626,6 b' class ApiController(JSONRPCController):' | |||||
696 | "msg" : "deleted user group ID:<user_group_id> <user_group_name>" |
|
626 | "msg" : "deleted user group ID:<user_group_id> <user_group_name>" | |
697 | } |
|
627 | } | |
698 | error : null |
|
628 | error : null | |
699 |
|
||||
700 | ERROR OUTPUT:: |
|
|||
701 |
|
||||
702 | id : <id_given_in_input> |
|
|||
703 | result : null |
|
|||
704 | error : { |
|
|||
705 | "failed to delete user group ID:<user_group_id> <user_group_name>" |
|
|||
706 | or |
|
|||
707 | "RepoGroup assigned to <repo_groups_list>" |
|
|||
708 | } |
|
|||
709 | """ |
|
629 | """ | |
710 | user_group = get_user_group_or_error(usergroupid) |
|
630 | user_group = get_user_group_or_error(usergroupid) | |
711 | if not HasPermissionAny('hg.admin')(): |
|
631 | if not HasPermissionAny('hg.admin')(): | |
@@ -746,14 +666,6 b' class ApiController(JSONRPCController):' | |||||
746 | User is already in that group" |
|
666 | User is already in that group" | |
747 | } |
|
667 | } | |
748 | error : null |
|
668 | error : null | |
749 |
|
||||
750 | ERROR OUTPUT:: |
|
|||
751 |
|
||||
752 | id : <id_given_in_input> |
|
|||
753 | result : null |
|
|||
754 | error : { |
|
|||
755 | "failed to add member to user group `<user_group_name>`" |
|
|||
756 | } |
|
|||
757 | """ |
|
669 | """ | |
758 | user = get_user_or_error(userid) |
|
670 | user = get_user_or_error(userid) | |
759 | user_group = get_user_group_or_error(usergroupid) |
|
671 | user_group = get_user_group_or_error(usergroupid) | |
@@ -1033,14 +945,6 b' class ApiController(JSONRPCController):' | |||||
1033 | "success" : true |
|
945 | "success" : true | |
1034 | } |
|
946 | } | |
1035 | error : null |
|
947 | error : null | |
1036 |
|
||||
1037 | ERROR OUTPUT:: |
|
|||
1038 |
|
||||
1039 | id : <id_given_in_input> |
|
|||
1040 | result : null |
|
|||
1041 | error : { |
|
|||
1042 | 'failed to create repository `<repo_name>` |
|
|||
1043 | } |
|
|||
1044 | """ |
|
948 | """ | |
1045 | group_name = None |
|
949 | group_name = None | |
1046 | repo_name_parts = repo_name.split('/') |
|
950 | repo_name_parts = repo_name.split('/') | |
@@ -1401,14 +1305,6 b' class ApiController(JSONRPCController):' | |||||
1401 | "success" : true |
|
1305 | "success" : true | |
1402 | } |
|
1306 | } | |
1403 | error : null |
|
1307 | error : null | |
1404 |
|
||||
1405 | ERROR OUTPUT:: |
|
|||
1406 |
|
||||
1407 | id : <id_given_in_input> |
|
|||
1408 | result : null |
|
|||
1409 | error : { |
|
|||
1410 | "failed to edit permission for user group: `<usergroup>` in repo `<repo>`' |
|
|||
1411 | } |
|
|||
1412 | """ |
|
1308 | """ | |
1413 | repo = get_repo_or_error(repoid) |
|
1309 | repo = get_repo_or_error(repoid) | |
1414 | perm = get_perm_or_error(perm) |
|
1310 | perm = get_perm_or_error(perm) | |
@@ -1546,14 +1442,6 b' class ApiController(JSONRPCController):' | |||||
1546 | "repo_group" : <repogroup_object> |
|
1442 | "repo_group" : <repogroup_object> | |
1547 | } |
|
1443 | } | |
1548 | error : null |
|
1444 | error : null | |
1549 |
|
||||
1550 | ERROR OUTPUT:: |
|
|||
1551 |
|
||||
1552 | id : <id_given_in_input> |
|
|||
1553 | result : null |
|
|||
1554 | error : { |
|
|||
1555 | failed to create repo group `<repogroupid>` |
|
|||
1556 | } |
|
|||
1557 | """ |
|
1445 | """ | |
1558 | if db.RepoGroup.get_by_group_name(group_name): |
|
1446 | if db.RepoGroup.get_by_group_name(group_name): | |
1559 | raise JSONRPCError("repo group `%s` already exist" % (group_name,)) |
|
1447 | raise JSONRPCError("repo group `%s` already exist" % (group_name,)) | |
@@ -1620,14 +1508,6 b' class ApiController(JSONRPCController):' | |||||
1620 | 'repo_group' : null |
|
1508 | 'repo_group' : null | |
1621 | } |
|
1509 | } | |
1622 | error : null |
|
1510 | error : null | |
1623 |
|
||||
1624 | ERROR OUTPUT:: |
|
|||
1625 |
|
||||
1626 | id : <id_given_in_input> |
|
|||
1627 | result : null |
|
|||
1628 | error : { |
|
|||
1629 | "failed to delete repo group ID:<repogroupid> <repogroupname>" |
|
|||
1630 | } |
|
|||
1631 | """ |
|
1511 | """ | |
1632 | repo_group = get_repo_group_or_error(repogroupid) |
|
1512 | repo_group = get_repo_group_or_error(repogroupid) | |
1633 |
|
1513 | |||
@@ -1662,14 +1542,6 b' class ApiController(JSONRPCController):' | |||||
1662 | "success" : true |
|
1542 | "success" : true | |
1663 | } |
|
1543 | } | |
1664 | error : null |
|
1544 | error : null | |
1665 |
|
||||
1666 | ERROR OUTPUT:: |
|
|||
1667 |
|
||||
1668 | id : <id_given_in_input> |
|
|||
1669 | result : null |
|
|||
1670 | error : { |
|
|||
1671 | "failed to edit permission for user: `<userid>` in repo group: `<repo_group_name>`" |
|
|||
1672 | } |
|
|||
1673 | """ |
|
1545 | """ | |
1674 | repo_group = get_repo_group_or_error(repogroupid) |
|
1546 | repo_group = get_repo_group_or_error(repogroupid) | |
1675 |
|
1547 | |||
@@ -1715,14 +1587,6 b' class ApiController(JSONRPCController):' | |||||
1715 | "success" : true |
|
1587 | "success" : true | |
1716 | } |
|
1588 | } | |
1717 | error : null |
|
1589 | error : null | |
1718 |
|
||||
1719 | ERROR OUTPUT:: |
|
|||
1720 |
|
||||
1721 | id : <id_given_in_input> |
|
|||
1722 | result : null |
|
|||
1723 | error : { |
|
|||
1724 | "failed to edit permission for user: `<userid>` in repo group: `<repo_group_name>`" |
|
|||
1725 | } |
|
|||
1726 | """ |
|
1590 | """ | |
1727 | repo_group = get_repo_group_or_error(repogroupid) |
|
1591 | repo_group = get_repo_group_or_error(repogroupid) | |
1728 |
|
1592 | |||
@@ -1769,14 +1633,6 b' class ApiController(JSONRPCController):' | |||||
1769 | "success" : true |
|
1633 | "success" : true | |
1770 | } |
|
1634 | } | |
1771 | error : null |
|
1635 | error : null | |
1772 |
|
||||
1773 | ERROR OUTPUT:: |
|
|||
1774 |
|
||||
1775 | id : <id_given_in_input> |
|
|||
1776 | result : null |
|
|||
1777 | error : { |
|
|||
1778 | "failed to edit permission for user group: `<usergroup>` in repo group: `<repo_group_name>`" |
|
|||
1779 | } |
|
|||
1780 | """ |
|
1636 | """ | |
1781 | repo_group = get_repo_group_or_error(repogroupid) |
|
1637 | repo_group = get_repo_group_or_error(repogroupid) | |
1782 | perm = get_perm_or_error(perm, prefix='group.') |
|
1638 | perm = get_perm_or_error(perm, prefix='group.') | |
@@ -1830,14 +1686,6 b' class ApiController(JSONRPCController):' | |||||
1830 | "success" : true |
|
1686 | "success" : true | |
1831 | } |
|
1687 | } | |
1832 | error : null |
|
1688 | error : null | |
1833 |
|
||||
1834 | ERROR OUTPUT:: |
|
|||
1835 |
|
||||
1836 | id : <id_given_in_input> |
|
|||
1837 | result : null |
|
|||
1838 | error : { |
|
|||
1839 | "failed to edit permission for user group: `<usergroup>` in repo group: `<repo_group_name>`" |
|
|||
1840 | } |
|
|||
1841 | """ |
|
1689 | """ | |
1842 | repo_group = get_repo_group_or_error(repogroupid) |
|
1690 | repo_group = get_repo_group_or_error(repogroupid) | |
1843 | user_group = get_user_group_or_error(usergroupid) |
|
1691 | user_group = get_user_group_or_error(usergroupid) | |
@@ -1920,14 +1768,6 b' class ApiController(JSONRPCController):' | |||||
1920 | "gist" : <gist_object> |
|
1768 | "gist" : <gist_object> | |
1921 | } |
|
1769 | } | |
1922 | error : null |
|
1770 | error : null | |
1923 |
|
||||
1924 | ERROR OUTPUT:: |
|
|||
1925 |
|
||||
1926 | id : <id_given_in_input> |
|
|||
1927 | result : null |
|
|||
1928 | error : { |
|
|||
1929 | "failed to create gist" |
|
|||
1930 | } |
|
|||
1931 | """ |
|
1771 | """ | |
1932 | try: |
|
1772 | try: | |
1933 | if owner is None: |
|
1773 | if owner is None: | |
@@ -1963,14 +1803,6 b' class ApiController(JSONRPCController):' | |||||
1963 | "gist" : null |
|
1803 | "gist" : null | |
1964 | } |
|
1804 | } | |
1965 | error : null |
|
1805 | error : null | |
1966 |
|
||||
1967 | ERROR OUTPUT:: |
|
|||
1968 |
|
||||
1969 | id : <id_given_in_input> |
|
|||
1970 | result : null |
|
|||
1971 | error : { |
|
|||
1972 | "failed to delete gist ID:<gist_id>" |
|
|||
1973 | } |
|
|||
1974 | """ |
|
1806 | """ | |
1975 | gist = get_gist_or_error(gistid) |
|
1807 | gist = get_gist_or_error(gistid) | |
1976 | if not HasPermissionAny('hg.admin')(): |
|
1808 | if not HasPermissionAny('hg.admin')(): |
General Comments 0
You need to be logged in to leave comments.
Login now