Changeset - 148360f533a4
[Not reviewed]
Merge default
0 26 0
Mads Kiilerich - 10 years ago 2015-07-13 19:37:39
madski@unity3d.com
Merge stable
7 files changed:
0 comments (0 inline, 0 general)
.hgtags
Show inline comments
 
c097458480a5972dd75d5695b61e855fd0ab371e rhodecode-0.0.0.7.0
 
8bdec09436cb7e4a764bd2ba50b84060e30eb34f rhodecode-0.0.0.7.1
 
1a18994cdc3bdd156ee93c7c0fb8d94a88f1f640 rhodecode-0.0.0.7.2
 
a3a7c3e03b76ee264a828cb1087970bb98bbffcd rhodecode-0.0.0.7.3
 
58b46f9194c347641bfc9a26697ef413a4761971 rhodecode-0.0.0.7.4
 
710e7a75bb6b8346cee3bd0ddda67592e4790268 rhodecode-0.0.0.7.5
 
ca80f8c0056211dad33483a50b913593516d7a6c rhodecode-0.0.0.7.6
 
0cf49c29c846fefeb4e1a222e4b1850e9e3eaa62 rhodecode-0.0.0.7.7
 
702c7e565c56a49c89414e81f28571c8e5b67408 rhodecode-0.0.0.7.8
 
c12f4d19c95065f313eefcd45eac9ef507f5fa55 rhodecode-0.0.0.7.9
 
558eb7c5028f24a90b5466ed16be13b213ba1fc2 rhodecode-0.0.0.8.0
 
a9814a642e11092b243ca01721254a04633a0ffc rhodecode-0.0.0.8.1
 
ccbe729908844884aea89d00fb14a6cb92e10c06 rhodecode-0.0.0.8.2
 
ca41d544dbdfd2f81bd0304168492a26276aadb6 rhodecode-0.0.0.8.3
 
2fa16ec5822da0c6fade3dd1ed9b6c0655e5dbbf rhodecode-0.0.0.8.4
 
16ba57d8fe2317c49dbd422afd07ab497687aa02 rhodecode-0.0.0.8.5
 
53128b6b9a4ddb6ee9554cbb83a082a6d1316b42 rhodecode-0.0.1.0.0rc4
 
afd98d1f817e6a6b52172735c22160239e615a6b rhodecode-0.0.1.0.0
 
bee56f209c40a6880f2f633b02227b5ee1f8ff5a rhodecode-0.0.1.0.1
 
d85b0948e53925ebbbc49e9f7967013a04f866e9 rhodecode-0.0.1.0.2
 
d9c8dddb96af521e346f05b88d515c536eef3d17 rhodecode-0.0.1.1.0
 
344f748517814ed0408a49e392dc625f4cc37fdc rhodecode-0.0.1.1.1
 
6c01c12eafb8cc72d4c4cbd121400fad755b2862 rhodecode-0.0.1.1.2
 
4fa80e0484ef5c33feaa9c39fc66916f410ba353 rhodecode-0.0.1.1.3
 
cb77867d69d3c5931712aac486c980a42ee90745 rhodecode-0.0.1.1.5
 
cb77867d69d3c5931712aac486c980a42ee90745 rhodecode-0.0.1.1.5
 
008bdfdd95c8bd31ae6d89f76c75c1f49cbcd0bc rhodecode-0.0.1.1.5
 
c5af1d3c861fb36b156224e75c2f55a97f54657d rhodecode-0.0.1.1.6
 
7327a0d1584cf28d33e738048af1f6809d499451 rhodecode-0.0.1.1.7
 
bd102f45950f779995a1beae42b6eb099cdd27b3 rhodecode-0.0.1.1.7
 
c8974135732aa0ceb841cee6df66e29f089b4963 rhodecode-0.0.1.1.8
 
c252049af24cd98eef5f4143fa3abbff3c912e29 rhodecode-0.0.1.2.0
 
0b8fba8ab90b01f811a50e6e7384989cced21d38 rhodecode-0.0.1.2.1
 
22273bec00ba2fd860c60a9277d3d7229e288e18 rhodecode-0.0.1.2.2
 
1ff606a7858dbd8a5f70b3da5cc89524bd0d84f9 rhodecode-0.0.1.2.3
 
a7a282a902b207ce34e830d643c79b7ab52e3b35 rhodecode-0.0.1.2.4
 
b6b611e7722e754abebaae6e265cbb4c823d344d rhodecode-0.0.1.2.5
 
dbc82e3362a25d2aece42060089824c4342efd17 rhodecode-0.0.1.3.0
 
79a95f338fd0115b2cdb77118f39e17d22ff505c rhodecode-0.0.1.3.1
 
9ab21c5ddb84935bea5c743b4e147ed5a398b30c rhodecode-0.0.1.3.2
 
934906f028b582a254e0028ba25e5d20dd32b9cd rhodecode-0.0.1.3.3
 
af21362474e3ab5aa0e2fbb1c872356f2c16c4f3 rhodecode-0.0.1.3.4
 
0e2792e04bd316fe64335cbe6a476031ac60b29b rhodecode-0.0.1.3.5
 
edfff9f37916389144d3a3644d0a7d7adfd79b11 rhodecode-0.0.1.3.6
 
9ae95fdeca184f2404205645f06c6597b74ef2db rhodecode-0.0.1.4.0
 
909143a4dde53c46d4f24abb426ec870471c7de1 rhodecode-0.0.1.4.1
 
d998cc84cf726798486a438763053f0e1dc1b646 rhodecode-0.0.1.4.2
 
3f5d40b9dd99ccb009ea2211ee2d4b594c634946 rhodecode-0.0.1.4.3
 
3148c08cf86f1849917e2d50f7ab7766c1550b0a rhodecode-0.0.1.4.4
 
a5f0bc867edc88be23eb808693e5393a97d4c54a rhodecode-0.0.1.5.0
 
3259dc7caea48687eab018ee646ae6ad7e7ef377 rhodecode-0.0.1.5.1
 
efe23d6c178c11d575a0214181276a3452776e48 rhodecode-0.0.1.5.2
 
1a498b11f1540f5b94b6f6009298f5dc3eaad9e9 rhodecode-0.0.1.5.3
 
3447862ad8c9ceba85857774c526e39fde3a2281 rhodecode-0.0.1.5.4
 
c15d7b336af58df9f1bbc8f8957464e7ea618d4c rhodecode-0.0.1.6.0rc1
 
78b53ee0d247f90d51b028307ff5717851b6c265 rhodecode-0.0.1.6.0
 
351ad34d56321349ff5bd38f537bd768b8efef2e rhodecode-0.0.1.7.0
 
1f71ef689d2a3c9978cea6591a1f4e9107a5ca83 rhodecode-0.0.1.7.1
 
d17e88a1a88a29f6fac948c94498129e405a40d3 0.1
 
ad0ce803b40cb17fc3988373052943e041030b02 0.2
 
c6e32714336345403adf76abb6ebf9b8116fcdc7 0.2.1
 
14f488a5dc4ca6647bc6acf12534fd137e968aa8 0.2.2
docs/api/api.rst
Show inline comments
 
@@ -452,552 +452,553 @@ OUTPUT::
 
get_user_group
 
--------------
 

	
 
Get an existing user group.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "get_user_group"
 
    args :    {
 
                "usergroupid" : "<user group id or name>"
 
              }
 

	
 
OUTPUT::
 

	
 
    id : <id_given_in_input>
 
    result : None if group not exist
 
             {
 
               "users_group_id" : "<id>",
 
               "group_name" :     "<groupname>",
 
               "active":          "<bool>",
 
               "members" :  [
 
                              {
 
                                "user_id" :  "<user_id>",
 
                                "api_key" :  "<api_key>",
 
                                "username" : "<username>",
 
                                "firstname": "<firstname>",
 
                                "lastname" : "<lastname>",
 
                                "email" :    "<email>",
 
                                "emails":    "<list_of_all_additional_emails>",
 
                                "active" :   "<bool>",
 
                                "admin" :    "<bool>",
 
                                "ldap_dn" :  "<ldap_dn>",
 
                                "last_login": "<last_login>",
 
                              },
 
 
                            ]
 
             }
 
    error : null
 

	
 

	
 
get_user_groups
 
---------------
 

	
 
List all existing user groups.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "get_user_groups"
 
    args :    { }
 

	
 
OUTPUT::
 

	
 
    id : <id_given_in_input>
 
    result : [
 
               {
 
               "users_group_id" : "<id>",
 
               "group_name" :     "<groupname>",
 
               "active":          "<bool>",
 
               },
 
 
              ]
 
    error : null
 

	
 

	
 
create_user_group
 
-----------------
 

	
 
Create a new user group.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "create_user_group"
 
    args:     {
 
                "group_name": "<groupname>",
 
                "owner" :     "<onwer_name_or_id = Optional(=apiuser)>",
 
                "active":     "<bool> = Optional(True)"
 
              }
 

	
 
OUTPUT::
 

	
 
    id : <id_given_in_input>
 
    result: {
 
              "msg": "created new user group `<groupname>`",
 
              "users_group": {
 
                     "users_group_id" : "<id>",
 
                     "group_name" :     "<groupname>",
 
                     "active":          "<bool>",
 
               },
 
            }
 
    error:  null
 

	
 

	
 
add_user_to_user_group
 
----------------------
 

	
 
Adds a user to a user group. If the user already is in that group, success will be
 
``false``.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "add_user_user_group"
 
    args:     {
 
                "usersgroupid" : "<user group id or name>",
 
                "userid" : "<user_id or username>",
 
              }
 

	
 
OUTPUT::
 

	
 
    id : <id_given_in_input>
 
    result: {
 
              "success": True|False # depends on if member is in group
 
              "msg": "added member `<username>` to a user group `<groupname>` |
 
                      User is already in that group"
 
            }
 
    error:  null
 

	
 

	
 
remove_user_from_user_group
 
---------------------------
 

	
 
Remove a user from a user group. If the user isn't in the given group, success will
 
be ``false``.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "remove_user_from_user_group"
 
    args:     {
 
                "usersgroupid" : "<user group id or name>",
 
                "userid" : "<user_id or username>",
 
              }
 

	
 
OUTPUT::
 

	
 
    id : <id_given_in_input>
 
    result: {
 
              "success":  True|False,  # depends on if member is in group
 
              "msg": "removed member <username> from user group <groupname> |
 
                      User wasn't in group"
 
            }
 
    error:  null
 

	
 

	
 
get_repo
 
--------
 

	
 
Get an existing repository by its name or repository_id. Members will contain
 
either users_group or users associated to that repository.
 
This command can only be executed using the api_key of a user with admin rights,
 
or that of a regular user with at least read access to the repository.
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "get_repo"
 
    args:     {
 
                "repoid" : "<reponame or repo_id>"
 
              }
 

	
 
OUTPUT::
 

	
 
    id : <id_given_in_input>
 
    result: None if repository does not exist or
 
            {
 
                "repo_id" :          "<repo_id>",
 
                "repo_name" :        "<reponame>"
 
                "repo_type" :        "<repo_type>",
 
                "clone_uri" :        "<clone_uri>",
 
                "enable_downloads":  "<bool>",
 
                "enable_locking":    "<bool>",
 
                "enable_statistics": "<bool>",
 
                "private":           "<bool>",
 
                "created_on" :       "<date_time_created>",
 
                "description" :      "<description>",
 
                "landing_rev":       "<landing_rev>",
 
                "last_changeset":    {
 
                                       "author":   "<full_author>",
 
                                       "date":     "<date_time_of_commit>",
 
                                       "message":  "<commit_message>",
 
                                       "raw_id":   "<raw_id>",
 
                                       "revision": "<numeric_revision>",
 
                                       "short_id": "<short_id>"
 
                                     }
 
                "owner":             "<repo_owner>",
 
                "fork_of":           "<name_of_fork_parent>",
 
                "members" :     [
 
                                  {
 
                                    "type":        "user",
 
                                    "user_id" :    "<user_id>",
 
                                    "api_key" :    "<api_key>",
 
                                    "username" :   "<username>",
 
                                    "firstname":   "<firstname>",
 
                                    "lastname" :   "<lastname>",
 
                                    "email" :      "<email>",
 
                                    "emails":      "<list_of_all_additional_emails>",
 
                                    "active" :     "<bool>",
 
                                    "admin" :      "<bool>",
 
                                    "ldap_dn" :    "<ldap_dn>",
 
                                    "last_login":  "<last_login>",
 
                                    "permission" : "repository.(read|write|admin)"
 
                                  },
 
 
                                  {
 
                                    "type":      "users_group",
 
                                    "id" :       "<usersgroupid>",
 
                                    "name" :     "<usersgroupname>",
 
                                    "active":    "<bool>",
 
                                    "permission" : "repository.(read|write|admin)"
 
                                  },
 
 
                                ]
 
                 "followers":   [
 
                                  {
 
                                    "user_id" :     "<user_id>",
 
                                    "username" :    "<username>",
 
                                    "api_key" :     "<api_key>",
 
                                    "firstname":    "<firstname>",
 
                                    "lastname" :    "<lastname>",
 
                                    "email" :       "<email>",
 
                                    "emails":       "<list_of_all_additional_emails>",
 
                                    "ip_addresses": "<list_of_ip_addresses_for_user>",
 
                                    "active" :      "<bool>",
 
                                    "admin" :       "<bool>",
 
                                    "ldap_dn" :     "<ldap_dn>",
 
                                    "last_login":   "<last_login>",
 
                                  },
 
 
                 ]
 
            }
 
    error:  null
 

	
 

	
 
get_repos
 
---------
 

	
 
List all existing repositories.
 
This command can only be executed using the api_key of a user with admin rights,
 
or that of a regular user with at least read access to the repository.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "get_repos"
 
    args:     { }
 

	
 
OUTPUT::
 

	
 
    id : <id_given_in_input>
 
    result: [
 
              {
 
                "repo_id" :          "<repo_id>",
 
                "repo_name" :        "<reponame>"
 
                "repo_type" :        "<repo_type>",
 
                "clone_uri" :        "<clone_uri>",
 
                "private": :         "<bool>",
 
                "created_on" :       "<datetimecreated>",
 
                "description" :      "<description>",
 
                "landing_rev":       "<landing_rev>",
 
                "owner":             "<repo_owner>",
 
                "fork_of":           "<name_of_fork_parent>",
 
                "enable_downloads":  "<bool>",
 
                "enable_locking":    "<bool>",
 
                "enable_statistics": "<bool>",
 
              },
 
 
            ]
 
    error:  null
 

	
 

	
 
get_repo_nodes
 
--------------
 

	
 
Return a list of files and directories for a given path at the given revision.
 
It is possible to specify ret_type to show only ``files`` or ``dirs``.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "get_repo_nodes"
 
    args:     {
 
                "repoid" : "<reponame or repo_id>"
 
                "revision"  : "<revision>",
 
                "root_path" : "<root_path>",
 
                "ret_type"  : "<ret_type> = Optional('all')"
 
              }
 

	
 
OUTPUT::
 

	
 
    id : <id_given_in_input>
 
    result: [
 
              {
 
                "name" :        "<name>"
 
                "type" :        "<type>",
 
              },
 
 
            ]
 
    error:  null
 

	
 

	
 
create_repo
 
-----------
 

	
 
Create a repository. If the repository name contains "/", all needed repository
 
groups will be created. For example "foo/bar/baz" will create repository groups
 
"foo", "bar" (with "foo" as parent), and create "baz" repository with
 
"bar" as group.
 
This command can only be executed using the api_key of a user with admin rights,
 
or that of a regular user with create repository permission.
 
Regular users cannot specify owner parameter.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "create_repo"
 
    args:     {
 
                "repo_name" :        "<reponame>",
 
                "owner" :            "<onwer_name_or_id = Optional(=apiuser)>",
 
                "repo_type" :        "<repo_type> = Optional('hg')",
 
                "description" :      "<description> = Optional('')",
 
                "private" :          "<bool> = Optional(False)",
 
                "clone_uri" :        "<clone_uri> = Optional(None)",
 
                "landing_rev" :      "<landing_rev> = Optional('tip')",
 
                "enable_downloads":  "<bool> = Optional(False)",
 
                "enable_locking":    "<bool> = Optional(False)",
 
                "enable_statistics": "<bool> = Optional(False)",
 
              }
 

	
 
OUTPUT::
 

	
 
    id : <id_given_in_input>
 
    result: {
 
              "msg": "Created new repository `<reponame>`",
 
              "repo": {
 
                "repo_id" :          "<repo_id>",
 
                "repo_name" :        "<reponame>"
 
                "repo_type" :        "<repo_type>",
 
                "clone_uri" :        "<clone_uri>",
 
                "private": :         "<bool>",
 
                "created_on" :       "<datetimecreated>",
 
                "description" :      "<description>",
 
                "landing_rev":       "<landing_rev>",
 
                "owner":             "<username or user_id>",
 
                "fork_of":           "<name_of_fork_parent>",
 
                "enable_downloads":  "<bool>",
 
                "enable_locking":    "<bool>",
 
                "enable_statistics": "<bool>",
 
              },
 
            }
 
    error:  null
 

	
 

	
 
fork_repo
 
---------
 

	
 
Create a fork of the given repo. If using Celery, this will
 
return success message immediately and a fork will be created
 
asynchronously.
 
This command can only be executed using the api_key of a user with admin rights,
 
or that of a regular user with fork permission and at least read access to the repository.
 
This command can only be executed using the api_key of a user with admin
 
rights, or with the global fork permission, by a regular user with create
 
repository permission and at least read access to the repository.
 
Regular users cannot specify owner parameter.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "fork_repo"
 
    args:     {
 
                "repoid" :          "<reponame or repo_id>",
 
                "fork_name":        "<forkname>",
 
                "owner":            "<username or user_id = Optional(=apiuser)>",
 
                "description":      "<description>",
 
                "copy_permissions": "<bool>",
 
                "private":          "<bool>",
 
                "landing_rev":      "<landing_rev>"
 

	
 
              }
 

	
 
OUTPUT::
 

	
 
    id : <id_given_in_input>
 
    result: {
 
              "msg": "Created fork of `<reponame>` as `<forkname>`",
 
              "success": true
 
            }
 
    error:  null
 

	
 

	
 
delete_repo
 
-----------
 

	
 
Delete a repository.
 
This command can only be executed using the api_key of a user with admin rights,
 
or that of a regular user with admin access to the repository.
 
When ``forks`` param is set it is possible to detach or delete forks of the deleted repository.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "delete_repo"
 
    args:     {
 
                "repoid" : "<reponame or repo_id>",
 
                "forks"  : "`delete` or `detach` = Optional(None)"
 
              }
 

	
 
OUTPUT::
 

	
 
    id : <id_given_in_input>
 
    result: {
 
              "msg": "Deleted repository `<reponame>`",
 
              "success": true
 
            }
 
    error:  null
 

	
 

	
 
grant_user_permission
 
---------------------
 

	
 
Grant permission for a user on the given repository, or update the existing one if found.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "grant_user_permission"
 
    args:     {
 
                "repoid" : "<reponame or repo_id>"
 
                "userid" : "<username or user_id>"
 
                "perm" :       "(repository.(none|read|write|admin))",
 
              }
 

	
 
OUTPUT::
 

	
 
    id : <id_given_in_input>
 
    result: {
 
              "msg" : "Granted perm: `<perm>` for user: `<username>` in repo: `<reponame>`",
 
              "success": true
 
            }
 
    error:  null
 

	
 

	
 
revoke_user_permission
 
----------------------
 

	
 
Revoke permission for a user on the given repository.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method  : "revoke_user_permission"
 
    args:     {
 
                "repoid" : "<reponame or repo_id>"
 
                "userid" : "<username or user_id>"
 
              }
 

	
 
OUTPUT::
 

	
 
    id : <id_given_in_input>
 
    result: {
 
              "msg" : "Revoked perm for user: `<username>` in repo: `<reponame>`",
 
              "success": true
 
            }
 
    error:  null
 

	
 

	
 
grant_user_group_permission
 
---------------------------
 

	
 
Grant permission for a user group on the given repository, or update the
 
existing one if found.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method :  "grant_user_group_permission"
 
    args:     {
 
                "repoid" : "<reponame or repo_id>"
 
                "usersgroupid" : "<user group id or name>"
 
                "perm" : "(repository.(none|read|write|admin))",
 
              }
 

	
 
OUTPUT::
 

	
 
    id : <id_given_in_input>
 
    result: {
 
              "msg" : "Granted perm: `<perm>` for group: `<usersgroupname>` in repo: `<reponame>`",
 
              "success": true
 
            }
 
    error:  null
 

	
 

	
 
revoke_user_group_permission
 
----------------------------
 

	
 
Revoke permission for a user group on the given repository.
 
This command can only be executed using the api_key of a user with admin rights.
 

	
 
INPUT::
 

	
 
    id : <id_for_response>
 
    api_key : "<api_key>"
 
    method  : "revoke_user_group_permission"
 
    args:     {
 
                "repoid" : "<reponame or repo_id>"
 
                "usersgroupid" : "<user group id or name>"
 
              }
 

	
 
OUTPUT::
 

	
 
    id : <id_given_in_input>
 
    result: {
 
              "msg" : "Revoked perm for group: `<usersgroupname>` in repo: `<reponame>`",
 
              "success": true
 
            }
 
    error:  null
kallithea/__init__.py
Show inline comments
 
# -*- coding: utf-8 -*-
 
# This program is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
# (at your option) any later version.
 
#
 
# This program is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
kallithea.__init__
 
~~~~~~~~~~~~~~~~~~
 

	
 
Kallithea, a web based repository management based on pylons
 
versioning implementation: http://www.python.org/dev/peps/pep-0386/
 

	
 
This file was forked by the Kallithea project in July 2014.
 
Original author and date, and relevant copyright and licensing information is below:
 
:created_on: Apr 9, 2010
 
:author: marcink
 
:copyright: (c) 2013 RhodeCode GmbH, (C) 2014 Bradley M. Kuhn, and others.
 
:license: GPLv3, see LICENSE.md for more details.
 
"""
 

	
 
import sys
 
import platform
 

	
 
VERSION = (0, 2, 1)
 
VERSION = (0, 2, 2)
 
BACKENDS = {
 
    'hg': 'Mercurial repository',
 
    'git': 'Git repository',
 
}
 

	
 
CELERY_ON = False
 
CELERY_EAGER = False
 

	
 
# link to config for pylons
 
CONFIG = {}
 

	
 
# Linked module for extensions
 
EXTENSIONS = {}
 

	
 
# BRAND controls internal references in database and config to the products
 
# own name.
 
#
 
# NOTE: If you want compatibility with a database that was originally created
 
#  for use with the RhodeCode software product, change BRAND to "rhodecode",
 
#  either by editing here or by creating a new file:
 
#  echo "BRAND = 'rhodecode'" > kallithea/brand.py
 

	
 
BRAND = "kallithea"
 
try:
 
    from kallithea.brand import BRAND
 
except ImportError:
 
    pass
 

	
 
# Prefix for the ui and settings table names
 
DB_PREFIX = (BRAND + "_") if BRAND != "kallithea" else ""
 

	
 
# Users.extern_type and .extern_name value for local users
 
EXTERN_TYPE_INTERNAL = BRAND if BRAND != 'kallithea' else 'internal'
 

	
 
# db_migrate_version.repository_id value, same as kallithea/lib/dbmigrate/migrate.cfg
 
DB_MIGRATIONS = BRAND + "_db_migrations"
 

	
 
try:
 
    from kallithea.lib import get_current_revision
 
    _rev = get_current_revision(quiet=True)
 
    if _rev and len(VERSION) > 3:
 
        VERSION += ('%s' % _rev[0],)
 
except ImportError:
 
    pass
 

	
 
__version__ = ('.'.join((str(each) for each in VERSION[:3])))
 
__dbversion__ = 31  # defines current db version for migrations
 
__platform__ = platform.system()
 
__license__ = 'GPLv3'
 
__py_version__ = sys.version_info
 
__author__ = "Various Authors"
 
__url__ = 'https://kallithea-scm.org/'
 

	
 
is_windows = __platform__ in ['Windows']
 
is_unix = not is_windows
 

	
 
if len(VERSION) > 3:
 
    __version__ += '.'+VERSION[3]
 

	
 
    if len(VERSION) > 4:
 
        __version__ += VERSION[4]
 
    else:
 
        __version__ += '0'
kallithea/controllers/admin/my_account.py
Show inline comments
 
# -*- coding: utf-8 -*-
 
# This program is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
# (at your option) any later version.
 
#
 
# This program is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
kallithea.controllers.admin.my_account
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
my account controller for Kallithea admin
 

	
 
This file was forked by the Kallithea project in July 2014.
 
Original author and date, and relevant copyright and licensing information is below:
 
:created_on: August 20, 2013
 
:author: marcink
 
:copyright: (c) 2013 RhodeCode GmbH, and others.
 
:license: GPLv3, see LICENSE.md for more details.
 
"""
 

	
 
import logging
 
import traceback
 
import formencode
 

	
 
from sqlalchemy import func
 
from formencode import htmlfill
 
from pylons import request, tmpl_context as c, url
 
from pylons.controllers.util import redirect
 
from pylons.i18n.translation import _
 

	
 
from kallithea import EXTERN_TYPE_INTERNAL
 
from kallithea.lib import helpers as h
 
from kallithea.lib.auth import LoginRequired, NotAnonymous, AuthUser
 
from kallithea.lib.base import BaseController, render
 
from kallithea.lib.utils2 import generate_api_key, safe_int
 
from kallithea.lib.compat import json
 
from kallithea.model.db import Repository, \
 
    UserEmailMap, UserApiKeys, User, UserFollowing
 
from kallithea.model.forms import UserForm, PasswordChangeForm
 
from kallithea.model.user import UserModel
 
from kallithea.model.repo import RepoModel
 
from kallithea.model.api_key import ApiKeyModel
 
from kallithea.model.meta import Session
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class MyAccountController(BaseController):
 
    """REST Controller styled on the Atom Publishing Protocol"""
 
    # To properly map this controller, ensure your config/routing.py
 
    # file has a resource setup:
 
    #     map.resource('setting', 'settings', controller='admin/settings',
 
    #         path_prefix='/admin', name_prefix='admin_')
 

	
 
    @LoginRequired()
 
    @NotAnonymous()
 
    def __before__(self):
 
        super(MyAccountController, self).__before__()
 

	
 
    def __load_data(self):
 
        c.user = User.get(self.authuser.user_id)
 
        if c.user.username == User.DEFAULT_USER:
 
            h.flash(_("You can't edit this user since it's"
 
                      " crucial for entire application"), category='warning')
 
            return redirect(url('users'))
 
        c.EXTERN_TYPE_INTERNAL = EXTERN_TYPE_INTERNAL
 

	
 
    def _load_my_repos_data(self, watched=False):
 
        if watched:
 
            admin = False
 
            repos_list = [x.follows_repository for x in
 
                          Session().query(UserFollowing).filter(
 
                              UserFollowing.user_id ==
 
                              self.authuser.user_id).all()]
 
        else:
 
            admin = True
 
            repos_list = Session().query(Repository)\
 
                         .filter(Repository.user_id ==
 
                                 self.authuser.user_id)\
 
                         .order_by(func.lower(Repository.repo_name)).all()
 

	
 
        repos_data = RepoModel().get_repos_as_dict(repos_list=repos_list,
 
                                                   admin=admin)
 
        #json used to render the grid
 
        return json.dumps(repos_data)
 

	
 
    def my_account(self):
 
        """
 
        GET /_admin/my_account Displays info about my account
 
        """
 
        # url('my_account')
 
        c.active = 'profile'
 
        self.__load_data()
 
        c.perm_user = AuthUser(user_id=self.authuser.user_id)
 
        c.ip_addr = self.ip_addr
 
        c.extern_type = c.user.extern_type
 
        c.extern_name = c.user.extern_name
 

	
 
        defaults = c.user.get_dict()
 
        update = False
 
        if request.POST:
 
            _form = UserForm(edit=True,
 
                             old_data={'user_id': self.authuser.user_id,
 
                                       'email': self.authuser.email})()
 
            form_result = {}
 
            try:
 
                post_data = dict(request.POST)
 
                post_data['new_password'] = ''
 
                post_data['password_confirmation'] = ''
 
                form_result = _form.to_python(post_data)
 
                # skip updating those attrs for my account
 
                skip_attrs = ['admin', 'active', 'extern_type', 'extern_name',
 
                              'new_password', 'password_confirmation']
 
                #TODO: plugin should define if username can be updated
 
                if c.extern_type != EXTERN_TYPE_INTERNAL:
 
                    # forbid updating username for external accounts
 
                    skip_attrs.append('username')
 

	
 
                UserModel().update(self.authuser.user_id, form_result,
 
                                   skip_attrs=skip_attrs)
 
                h.flash(_('Your account was updated successfully'),
 
                        category='success')
 
                Session().commit()
 
                update = True
 

	
 
            except formencode.Invalid, errors:
 
                return htmlfill.render(
 
                    render('admin/my_account/my_account.html'),
 
                    defaults=errors.value,
 
                    errors=errors.error_dict or {},
 
                    prefix_error=False,
 
                    encoding="UTF-8",
 
                    force_defaults=False)
 
            except Exception:
 
                log.error(traceback.format_exc())
 
                h.flash(_('Error occurred during update of user %s') \
 
                        % form_result.get('username'), category='error')
 
        if update:
 
            return redirect('my_account')
 
        return htmlfill.render(
 
            render('admin/my_account/my_account.html'),
 
            defaults=defaults,
 
            encoding="UTF-8",
 
            force_defaults=False)
 

	
 
    def my_account_password(self):
 
        c.active = 'password'
 
        self.__load_data()
 
        if request.POST:
 
            _form = PasswordChangeForm(self.authuser.username)()
 
            try:
 
                form_result = _form.to_python(request.POST)
 
                UserModel().update(self.authuser.user_id, form_result)
 
                Session().commit()
 
                h.flash(_("Successfully updated password"), category='success')
 
            except formencode.Invalid as errors:
 
                return htmlfill.render(
 
                    render('admin/my_account/my_account.html'),
 
                    defaults=errors.value,
 
                    errors=errors.error_dict or {},
 
                    prefix_error=False,
 
                    encoding="UTF-8",
 
                    force_defaults=False)
 
            except Exception:
 
                log.error(traceback.format_exc())
 
                h.flash(_('Error occurred during update of user password'),
 
                        category='error')
 
        return render('admin/my_account/my_account.html')
 

	
 
    def my_account_repos(self):
 
        c.active = 'repos'
 
        self.__load_data()
 

	
 
        #json used to render the grid
 
        c.data = self._load_my_repos_data()
 
        return render('admin/my_account/my_account.html')
 

	
 
    def my_account_watched(self):
 
        c.active = 'watched'
 
        self.__load_data()
 

	
 
        #json used to render the grid
 
        c.data = self._load_my_repos_data(watched=True)
 
        return render('admin/my_account/my_account.html')
 

	
 
    def my_account_perms(self):
 
        c.active = 'perms'
 
        self.__load_data()
 
        c.perm_user = AuthUser(user_id=self.authuser.user_id)
 
        c.ip_addr = self.ip_addr
 

	
 
        return render('admin/my_account/my_account.html')
 

	
 
    def my_account_emails(self):
 
        c.active = 'emails'
 
        self.__load_data()
 

	
 
        c.user_email_map = UserEmailMap.query()\
 
            .filter(UserEmailMap.user == c.user).all()
 
        return render('admin/my_account/my_account.html')
 

	
 
    def my_account_emails_add(self):
 
        email = request.POST.get('new_email')
 

	
 
        try:
 
            UserModel().add_extra_email(self.authuser.user_id, email)
 
            Session().commit()
 
            h.flash(_("Added email %s to user") % email, category='success')
 
        except formencode.Invalid, error:
 
            msg = error.error_dict['email']
 
            h.flash(msg, category='error')
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            h.flash(_('An error occurred during email saving'),
 
                    category='error')
 
        return redirect(url('my_account_emails'))
 

	
 
    def my_account_emails_delete(self):
 
        email_id = request.POST.get('del_email_id')
 
        user_model = UserModel()
 
        user_model.delete_extra_email(self.authuser.user_id, email_id)
 
        Session().commit()
 
        h.flash(_("Removed email from user"), category='success')
 
        return redirect(url('my_account_emails'))
 

	
 
    def my_account_api_keys(self):
 
        c.active = 'api_keys'
 
        self.__load_data()
 
        show_expired = True
 
        c.lifetime_values = [
 
            (str(-1), _('Forever')),
 
            (str(5), _('5 minutes')),
 
            (str(60), _('1 hour')),
 
            (str(60 * 24), _('1 day')),
 
            (str(60 * 24 * 30), _('1 month')),
 
        ]
 
        c.lifetime_options = [(c.lifetime_values, _("Lifetime"))]
 
        c.user_api_keys = ApiKeyModel().get_api_keys(self.authuser.user_id,
 
                                                     show_expired=show_expired)
 
        return render('admin/my_account/my_account.html')
 

	
 
    def my_account_api_keys_add(self):
 
        lifetime = safe_int(request.POST.get('lifetime'), -1)
 
        description = request.POST.get('description')
 
        ApiKeyModel().create(self.authuser.user_id, description, lifetime)
 
        Session().commit()
 
        h.flash(_("API key successfully created"), category='success')
 
        return redirect(url('my_account_api_keys'))
 

	
 
    def my_account_api_keys_delete(self):
 
        api_key = request.POST.get('del_api_key')
 
        user_id = self.authuser.user_id
 
        if request.POST.get('del_api_key_builtin'):
 
            user = User.get(user_id)
 
            if user:
 
                user.api_key = generate_api_key(user.username)
 
                user.api_key = generate_api_key()
 
                Session().add(user)
 
                Session().commit()
 
                h.flash(_("API key successfully reset"), category='success')
 
        elif api_key:
 
            ApiKeyModel().delete(api_key, self.authuser.user_id)
 
            Session().commit()
 
            h.flash(_("API key successfully deleted"), category='success')
 

	
 
        return redirect(url('my_account_api_keys'))
kallithea/controllers/admin/users.py
Show inline comments
 
# -*- coding: utf-8 -*-
 
# This program is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
# (at your option) any later version.
 
#
 
# This program is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
kallithea.controllers.admin.users
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Users crud controller for pylons
 

	
 
This file was forked by the Kallithea project in July 2014.
 
Original author and date, and relevant copyright and licensing information is below:
 
:created_on: Apr 4, 2010
 
:author: marcink
 
:copyright: (c) 2013 RhodeCode GmbH, and others.
 
:license: GPLv3, see LICENSE.md for more details.
 
"""
 

	
 
import logging
 
import traceback
 
import formencode
 

	
 
from formencode import htmlfill
 
from pylons import request, tmpl_context as c, url, config
 
from pylons.controllers.util import redirect
 
from pylons.i18n.translation import _
 
from sqlalchemy.sql.expression import func
 
from webob.exc import HTTPNotFound
 

	
 
import kallithea
 
from kallithea.lib.exceptions import DefaultUserException, \
 
    UserOwnsReposException, UserCreationError
 
from kallithea.lib import helpers as h
 
from kallithea.lib.auth import LoginRequired, HasPermissionAllDecorator, \
 
    AuthUser
 
import kallithea.lib.auth_modules.auth_internal
 
from kallithea.lib import auth_modules
 
from kallithea.lib.base import BaseController, render
 
from kallithea.model.api_key import ApiKeyModel
 

	
 
from kallithea.model.db import User, UserEmailMap, UserIpMap, UserToPerm
 
from kallithea.model.forms import UserForm, CustomDefaultPermissionsForm
 
from kallithea.model.user import UserModel
 
from kallithea.model.meta import Session
 
from kallithea.lib.utils import action_logger
 
from kallithea.lib.compat import json
 
from kallithea.lib.utils2 import datetime_to_time, safe_int, generate_api_key
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
class UsersController(BaseController):
 
    """REST Controller styled on the Atom Publishing Protocol"""
 

	
 
    @LoginRequired()
 
    @HasPermissionAllDecorator('hg.admin')
 
    def __before__(self):
 
        super(UsersController, self).__before__()
 
        c.available_permissions = config['available_permissions']
 
        c.EXTERN_TYPE_INTERNAL = kallithea.EXTERN_TYPE_INTERNAL
 

	
 
    def index(self, format='html'):
 
        """GET /users: All items in the collection"""
 
        # url('users')
 

	
 
        c.users_list = User.query().order_by(User.username)\
 
                        .filter(User.username != User.DEFAULT_USER)\
 
                        .order_by(func.lower(User.username))\
 
                        .all()
 

	
 
        users_data = []
 
        total_records = len(c.users_list)
 
        _tmpl_lookup = kallithea.CONFIG['pylons.app_globals'].mako_lookup
 
        template = _tmpl_lookup.get_template('data_table/_dt_elements.html')
 

	
 
        grav_tmpl = '<div class="gravatar">%s</div>'
 

	
 
        username = lambda user_id, username: (
 
                template.get_def("user_name")
 
                .render(user_id, username, _=_, h=h, c=c))
 

	
 
        user_actions = lambda user_id, username: (
 
                template.get_def("user_actions")
 
                .render(user_id, username, _=_, h=h, c=c))
 

	
 
        for user in c.users_list:
 
            users_data.append({
 
                "gravatar": grav_tmpl % h.gravatar(user.email, size=20),
 
                "raw_name": user.username,
 
                "username": username(user.user_id, user.username),
 
                "firstname": h.escape(user.name),
 
                "lastname": h.escape(user.lastname),
 
                "last_login": h.fmt_date(user.last_login),
 
                "last_login_raw": datetime_to_time(user.last_login),
 
                "active": h.boolicon(user.active),
 
                "admin": h.boolicon(user.admin),
 
                "extern_type": user.extern_type,
 
                "extern_name": user.extern_name,
 
                "action": user_actions(user.user_id, user.username),
 
            })
 

	
 
        c.data = json.dumps({
 
            "totalRecords": total_records,
 
            "startIndex": 0,
 
            "sort": None,
 
            "dir": "asc",
 
            "records": users_data
 
        })
 

	
 
        return render('admin/users/users.html')
 

	
 
    def create(self):
 
        """POST /users: Create a new item"""
 
        # url('users')
 
        c.default_extern_type = auth_modules.auth_internal.KallitheaAuthPlugin.name
 
        user_model = UserModel()
 
        user_form = UserForm()()
 
        try:
 
            form_result = user_form.to_python(dict(request.POST))
 
            user = user_model.create(form_result)
 
            usr = form_result['username']
 
            action_logger(self.authuser, 'admin_created_user:%s' % usr,
 
                          None, self.ip_addr, self.sa)
 
            h.flash(h.literal(_('Created user %s') % h.link_to(h.escape(usr), url('edit_user', id=user.user_id))),
 
                    category='success')
 
            Session().commit()
 
        except formencode.Invalid, errors:
 
            return htmlfill.render(
 
                render('admin/users/user_add.html'),
 
                defaults=errors.value,
 
                errors=errors.error_dict or {},
 
                prefix_error=False,
 
                encoding="UTF-8",
 
                force_defaults=False)
 
        except UserCreationError, e:
 
            h.flash(e, 'error')
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            h.flash(_('Error occurred during creation of user %s') \
 
                    % request.POST.get('username'), category='error')
 
        return redirect(url('users'))
 

	
 
    def new(self, format='html'):
 
        """GET /users/new: Form to create a new item"""
 
        # url('new_user')
 
        c.default_extern_type = auth_modules.auth_internal.KallitheaAuthPlugin.name
 
        return render('admin/users/user_add.html')
 

	
 
    def update(self, id):
 
        """PUT /users/id: Update an existing item"""
 
        # Forms posted to this method should contain a hidden field:
 
        #    <input type="hidden" name="_method" value="PUT" />
 
        # Or using helpers:
 
        #    h.form(url('update_user', id=ID),
 
        #           method='put')
 
        # url('user', id=ID)
 
        c.active = 'profile'
 
        user_model = UserModel()
 
        c.user = user_model.get(id)
 
        c.extern_type = c.user.extern_type
 
        c.extern_name = c.user.extern_name
 
        c.perm_user = AuthUser(user_id=id)
 
        c.ip_addr = self.ip_addr
 
        _form = UserForm(edit=True, old_data={'user_id': id,
 
                                              'email': c.user.email})()
 
        form_result = {}
 
        try:
 
            form_result = _form.to_python(dict(request.POST))
 
            skip_attrs = ['extern_type', 'extern_name']
 
            #TODO: plugin should define if username can be updated
 
            if c.extern_type != kallithea.EXTERN_TYPE_INTERNAL:
 
                # forbid updating username for external accounts
 
                skip_attrs.append('username')
 

	
 
            user_model.update(id, form_result, skip_attrs=skip_attrs)
 
            usr = form_result['username']
 
            action_logger(self.authuser, 'admin_updated_user:%s' % usr,
 
                          None, self.ip_addr, self.sa)
 
            h.flash(_('User updated successfully'), category='success')
 
            Session().commit()
 
        except formencode.Invalid, errors:
 
            defaults = errors.value
 
            e = errors.error_dict or {}
 
            defaults.update({
 
                'create_repo_perm': user_model.has_perm(id,
 
                                                        'hg.create.repository'),
 
                'fork_repo_perm': user_model.has_perm(id, 'hg.fork.repository'),
 
                '_method': 'put'
 
            })
 
            return htmlfill.render(
 
                render('admin/users/user_edit.html'),
 
                defaults=defaults,
 
                errors=e,
 
                prefix_error=False,
 
                encoding="UTF-8",
 
                force_defaults=False)
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            h.flash(_('Error occurred during update of user %s') \
 
                    % form_result.get('username'), category='error')
 
        return redirect(url('edit_user', id=id))
 

	
 
    def delete(self, id):
 
        """DELETE /users/id: Delete an existing item"""
 
        # Forms posted to this method should contain a hidden field:
 
        #    <input type="hidden" name="_method" value="DELETE" />
 
        # Or using helpers:
 
        #    h.form(url('delete_user', id=ID),
 
        #           method='delete')
 
        # url('user', id=ID)
 
        usr = User.get_or_404(id)
 
        try:
 
            UserModel().delete(usr)
 
            Session().commit()
 
            h.flash(_('Successfully deleted user'), category='success')
 
        except (UserOwnsReposException, DefaultUserException), e:
 
            h.flash(e, category='warning')
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            h.flash(_('An error occurred during deletion of user'),
 
                    category='error')
 
        return redirect(url('users'))
 

	
 
    def show(self, id, format='html'):
 
        """GET /users/id: Show a specific item"""
 
        # url('user', id=ID)
 
        User.get_or_404(-1)
 

	
 
    def _get_user_or_raise_if_default(self, id):
 
        try:
 
            return User.get_or_404(id, allow_default=False)
 
        except DefaultUserException:
 
            h.flash(_("The default user cannot be edited"), category='warning')
 
            raise HTTPNotFound
 

	
 
    def edit(self, id, format='html'):
 
        """GET /users/id/edit: Form to edit an existing item"""
 
        # url('edit_user', id=ID)
 
        c.user = self._get_user_or_raise_if_default(id)
 
        c.active = 'profile'
 
        c.extern_type = c.user.extern_type
 
        c.extern_name = c.user.extern_name
 
        c.perm_user = AuthUser(user_id=id)
 
        c.ip_addr = self.ip_addr
 

	
 
        defaults = c.user.get_dict()
 
        return htmlfill.render(
 
            render('admin/users/user_edit.html'),
 
            defaults=defaults,
 
            encoding="UTF-8",
 
            force_defaults=False)
 

	
 
    def edit_advanced(self, id):
 
        c.user = self._get_user_or_raise_if_default(id)
 
        c.active = 'advanced'
 
        c.perm_user = AuthUser(user_id=id)
 
        c.ip_addr = self.ip_addr
 

	
 
        umodel = UserModel()
 
        defaults = c.user.get_dict()
 
        defaults.update({
 
            'create_repo_perm': umodel.has_perm(c.user, 'hg.create.repository'),
 
            'create_user_group_perm': umodel.has_perm(c.user,
 
                                                      'hg.usergroup.create.true'),
 
            'fork_repo_perm': umodel.has_perm(c.user, 'hg.fork.repository'),
 
        })
 
        return htmlfill.render(
 
            render('admin/users/user_edit.html'),
 
            defaults=defaults,
 
            encoding="UTF-8",
 
            force_defaults=False)
 

	
 
    def edit_api_keys(self, id):
 
        c.user = self._get_user_or_raise_if_default(id)
 
        c.active = 'api_keys'
 
        show_expired = True
 
        c.lifetime_values = [
 
            (str(-1), _('Forever')),
 
            (str(5), _('5 minutes')),
 
            (str(60), _('1 hour')),
 
            (str(60 * 24), _('1 day')),
 
            (str(60 * 24 * 30), _('1 month')),
 
        ]
 
        c.lifetime_options = [(c.lifetime_values, _("Lifetime"))]
 
        c.user_api_keys = ApiKeyModel().get_api_keys(c.user.user_id,
 
                                                     show_expired=show_expired)
 
        defaults = c.user.get_dict()
 
        return htmlfill.render(
 
            render('admin/users/user_edit.html'),
 
            defaults=defaults,
 
            encoding="UTF-8",
 
            force_defaults=False)
 

	
 
    def add_api_key(self, id):
 
        c.user = self._get_user_or_raise_if_default(id)
 

	
 
        lifetime = safe_int(request.POST.get('lifetime'), -1)
 
        description = request.POST.get('description')
 
        ApiKeyModel().create(c.user.user_id, description, lifetime)
 
        Session().commit()
 
        h.flash(_("API key successfully created"), category='success')
 
        return redirect(url('edit_user_api_keys', id=c.user.user_id))
 

	
 
    def delete_api_key(self, id):
 
        c.user = self._get_user_or_raise_if_default(id)
 

	
 
        api_key = request.POST.get('del_api_key')
 
        if request.POST.get('del_api_key_builtin'):
 
            user = User.get(c.user.user_id)
 
            if user:
 
                user.api_key = generate_api_key(user.username)
 
                user.api_key = generate_api_key()
 
                Session().add(user)
 
                Session().commit()
 
                h.flash(_("API key successfully reset"), category='success')
 
        elif api_key:
 
            ApiKeyModel().delete(api_key, c.user.user_id)
 
            Session().commit()
 
            h.flash(_("API key successfully deleted"), category='success')
 

	
 
        return redirect(url('edit_user_api_keys', id=c.user.user_id))
 

	
 
    def update_account(self, id):
 
        pass
 

	
 
    def edit_perms(self, id):
 
        c.user = self._get_user_or_raise_if_default(id)
 
        c.active = 'perms'
 
        c.perm_user = AuthUser(user_id=id)
 
        c.ip_addr = self.ip_addr
 

	
 
        umodel = UserModel()
 
        defaults = c.user.get_dict()
 
        defaults.update({
 
            'create_repo_perm': umodel.has_perm(c.user, 'hg.create.repository'),
 
            'create_user_group_perm': umodel.has_perm(c.user,
 
                                                      'hg.usergroup.create.true'),
 
            'fork_repo_perm': umodel.has_perm(c.user, 'hg.fork.repository'),
 
        })
 
        return htmlfill.render(
 
            render('admin/users/user_edit.html'),
 
            defaults=defaults,
 
            encoding="UTF-8",
 
            force_defaults=False)
 

	
 
    def update_perms(self, id):
 
        """PUT /users_perm/id: Update an existing item"""
 
        # url('user_perm', id=ID, method='put')
 
        user = self._get_user_or_raise_if_default(id)
 

	
 
        try:
 
            form = CustomDefaultPermissionsForm()()
 
            form_result = form.to_python(request.POST)
 

	
 
            inherit_perms = form_result['inherit_default_permissions']
 
            user.inherit_default_permissions = inherit_perms
 
            Session().add(user)
 
            user_model = UserModel()
 

	
 
            defs = UserToPerm.query()\
 
                .filter(UserToPerm.user == user)\
 
                .all()
 
            for ug in defs:
 
                Session().delete(ug)
 

	
 
            if form_result['create_repo_perm']:
 
                user_model.grant_perm(id, 'hg.create.repository')
 
            else:
 
                user_model.grant_perm(id, 'hg.create.none')
 
            if form_result['create_user_group_perm']:
 
                user_model.grant_perm(id, 'hg.usergroup.create.true')
 
            else:
 
                user_model.grant_perm(id, 'hg.usergroup.create.false')
 
            if form_result['fork_repo_perm']:
 
                user_model.grant_perm(id, 'hg.fork.repository')
 
            else:
 
                user_model.grant_perm(id, 'hg.fork.none')
 
            h.flash(_("Updated permissions"), category='success')
 
            Session().commit()
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            h.flash(_('An error occurred during permissions saving'),
 
                    category='error')
 
        return redirect(url('edit_user_perms', id=id))
 

	
 
    def edit_emails(self, id):
 
        c.user = self._get_user_or_raise_if_default(id)
 
        c.active = 'emails'
 
        c.user_email_map = UserEmailMap.query()\
 
            .filter(UserEmailMap.user == c.user).all()
 

	
 
        defaults = c.user.get_dict()
 
        return htmlfill.render(
 
            render('admin/users/user_edit.html'),
 
            defaults=defaults,
 
            encoding="UTF-8",
 
            force_defaults=False)
 

	
 
    def add_email(self, id):
 
        """POST /user_emails:Add an existing item"""
 
        # url('user_emails', id=ID, method='put')
 
        user = self._get_user_or_raise_if_default(id)
 
        email = request.POST.get('new_email')
 
        user_model = UserModel()
 

	
 
        try:
 
            user_model.add_extra_email(id, email)
 
            Session().commit()
 
            h.flash(_("Added email %s to user") % email, category='success')
 
        except formencode.Invalid, error:
 
            msg = error.error_dict['email']
 
            h.flash(msg, category='error')
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            h.flash(_('An error occurred during email saving'),
 
                    category='error')
 
        return redirect(url('edit_user_emails', id=id))
 

	
 
    def delete_email(self, id):
 
        """DELETE /user_emails_delete/id: Delete an existing item"""
 
        # url('user_emails_delete', id=ID, method='delete')
 
        user = self._get_user_or_raise_if_default(id)
 
        email_id = request.POST.get('del_email_id')
 
        user_model = UserModel()
 
        user_model.delete_extra_email(id, email_id)
 
        Session().commit()
 
        h.flash(_("Removed email from user"), category='success')
 
        return redirect(url('edit_user_emails', id=id))
 

	
 
    def edit_ips(self, id):
 
        c.user = self._get_user_or_raise_if_default(id)
 
        c.active = 'ips'
 
        c.user_ip_map = UserIpMap.query()\
 
            .filter(UserIpMap.user == c.user).all()
 

	
 
        c.inherit_default_ips = c.user.inherit_default_permissions
 
        c.default_user_ip_map = UserIpMap.query()\
 
            .filter(UserIpMap.user == User.get_default_user()).all()
 

	
 
        defaults = c.user.get_dict()
 
        return htmlfill.render(
 
            render('admin/users/user_edit.html'),
 
            defaults=defaults,
 
            encoding="UTF-8",
 
            force_defaults=False)
 

	
 
    def add_ip(self, id):
 
        """POST /user_ips:Add an existing item"""
 
        # url('user_ips', id=ID, method='put')
 

	
 
        ip = request.POST.get('new_ip')
 
        user_model = UserModel()
 

	
 
        try:
 
            user_model.add_extra_ip(id, ip)
 
            Session().commit()
 
            h.flash(_("Added IP address %s to user whitelist") % ip, category='success')
 
        except formencode.Invalid, error:
 
            msg = error.error_dict['ip']
 
            h.flash(msg, category='error')
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            h.flash(_('An error occurred during ip saving'),
 
                    category='error')
 

	
 
        if 'default_user' in request.POST:
 
            return redirect(url('admin_permissions_ips'))
 
        return redirect(url('edit_user_ips', id=id))
 

	
 
    def delete_ip(self, id):
 
        """DELETE /user_ips_delete/id: Delete an existing item"""
 
        # url('user_ips_delete', id=ID, method='delete')
 
        ip_id = request.POST.get('del_ip_id')
 
        user_model = UserModel()
 
        user_model.delete_extra_ip(id, ip_id)
 
        Session().commit()
 
        h.flash(_("Removed IP address from user whitelist"), category='success')
 

	
 
        if 'default_user' in request.POST:
 
            return redirect(url('admin_permissions_ips'))
 
        return redirect(url('edit_user_ips', id=id))
kallithea/controllers/api/api.py
Show inline comments
 
@@ -1175,865 +1175,879 @@ class ApiController(JSONRPCController):
 

	
 
        try:
 
            success = UserGroupModel().remove_user_from_group(user_group, user)
 
            msg = 'removed member `%s` from user group `%s`' % (
 
                user.username, user_group.users_group_name
 
            )
 
            msg = msg if success else "User wasn't in group"
 
            Session().commit()
 
            return dict(success=success, msg=msg)
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            raise JSONRPCError(
 
                'failed to remove member from user group `%s`' % (
 
                    user_group.users_group_name,
 
                )
 
            )
 

	
 
    # permission check inside
 
    def get_repo(self, apiuser, repoid):
 
        """
 
        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 or regular user that have at least read access to repository.
 

	
 
        :param apiuser: filled automatically from apikey
 
        :type apiuser: AuthUser
 
        :param repoid: repository name or repository id
 
        :type repoid: str or int
 

	
 
        OUTPUT::
 

	
 
          id : <id_given_in_input>
 
          result : {
 
            {
 
                "repo_id" :          "<repo_id>",
 
                "repo_name" :        "<reponame>"
 
                "repo_type" :        "<repo_type>",
 
                "clone_uri" :        "<clone_uri>",
 
                "enable_downloads":  "<bool>",
 
                "enable_locking":    "<bool>",
 
                "enable_statistics": "<bool>",
 
                "private":           "<bool>",
 
                "created_on" :       "<date_time_created>",
 
                "description" :      "<description>",
 
                "landing_rev":       "<landing_rev>",
 
                "last_changeset":    {
 
                                       "author":   "<full_author>",
 
                                       "date":     "<date_time_of_commit>",
 
                                       "message":  "<commit_message>",
 
                                       "raw_id":   "<raw_id>",
 
                                       "revision": "<numeric_revision>",
 
                                       "short_id": "<short_id>"
 
                                     }
 
                "owner":             "<repo_owner>",
 
                "fork_of":           "<name_of_fork_parent>",
 
                "members" :     [
 
                                  {
 
                                    "name":     "<username>",
 
                                    "type" :    "user",
 
                                    "permission" : "repository.(read|write|admin)"
 
                                  },
 
 
                                  {
 
                                    "name":     "<usergroup name>",
 
                                    "type" :    "user_group",
 
                                    "permission" : "usergroup.(read|write|admin)"
 
                                  },
 
 
                                ]
 
                 "followers":   [<user_obj>, ...]
 
                 ]
 
            }
 
          }
 
          error :  null
 

	
 
        """
 
        repo = get_repo_or_error(repoid)
 

	
 
        if not HasPermissionAnyApi('hg.admin')(user=apiuser):
 
            # check if we have admin permission for this repo !
 
            perms = ('repository.admin', 'repository.write', 'repository.read')
 
            if not HasRepoPermissionAnyApi(*perms)(user=apiuser, repo_name=repo.repo_name):
 
                raise JSONRPCError('repository `%s` does not exist' % (repoid,))
 

	
 
        members = []
 
        followers = []
 
        for user in repo.repo_to_perm:
 
            perm = user.permission.permission_name
 
            user = user.user
 
            user_data = {
 
                'name': user.username,
 
                'type': "user",
 
                'permission': perm
 
            }
 
            members.append(user_data)
 

	
 
        for user_group in repo.users_group_to_perm:
 
            perm = user_group.permission.permission_name
 
            user_group = user_group.users_group
 
            user_group_data = {
 
                'name': user_group.users_group_name,
 
                'type': "user_group",
 
                'permission': perm
 
            }
 
            members.append(user_group_data)
 

	
 
        for user in repo.followers:
 
            followers.append(user.user.get_api_data())
 

	
 
        data = repo.get_api_data()
 
        data['members'] = members
 
        data['followers'] = followers
 
        return data
 

	
 
    # permission check inside
 
    def get_repos(self, apiuser):
 
        """
 
        Lists all existing repositories. This command can be executed only using
 
        api_key belonging to user with admin rights or regular user that have
 
        admin, write or read access to repository.
 

	
 
        :param apiuser: filled automatically from apikey
 
        :type apiuser: AuthUser
 

	
 
        OUTPUT::
 

	
 
            id : <id_given_in_input>
 
            result: [
 
                      {
 
                        "repo_id" :          "<repo_id>",
 
                        "repo_name" :        "<reponame>"
 
                        "repo_type" :        "<repo_type>",
 
                        "clone_uri" :        "<clone_uri>",
 
                        "private": :         "<bool>",
 
                        "created_on" :       "<datetimecreated>",
 
                        "description" :      "<description>",
 
                        "landing_rev":       "<landing_rev>",
 
                        "owner":             "<repo_owner>",
 
                        "fork_of":           "<name_of_fork_parent>",
 
                        "enable_downloads":  "<bool>",
 
                        "enable_locking":    "<bool>",
 
                        "enable_statistics": "<bool>",
 
                      },
 
 
                    ]
 
            error:  null
 
        """
 
        result = []
 
        if not HasPermissionAnyApi('hg.admin')(user=apiuser):
 
            repos = RepoModel().get_all_user_repos(user=apiuser)
 
        else:
 
            repos = RepoModel().get_all()
 

	
 
        for repo in repos:
 
            result.append(repo.get_api_data())
 
        return result
 

	
 
    # permission check inside
 
    def get_repo_nodes(self, apiuser, repoid, revision, root_path,
 
                       ret_type=Optional('all')):
 
        """
 
        returns a list of nodes and it's children in a flat list for a given path
 
        at given revision. It's possible to specify ret_type to show only `files` or
 
        `dirs`.  This command can be executed only using api_key belonging to
 
        user with admin rights or regular user that have at least read access to repository.
 

	
 
        :param apiuser: filled automatically from apikey
 
        :type apiuser: AuthUser
 
        :param repoid: repository name or repository id
 
        :type repoid: str or int
 
        :param revision: revision for which listing should be done
 
        :type revision: str
 
        :param root_path: path from which start displaying
 
        :type root_path: str
 
        :param ret_type: return type 'all|files|dirs' nodes
 
        :type ret_type: Optional(str)
 

	
 

	
 
        OUTPUT::
 

	
 
            id : <id_given_in_input>
 
            result: [
 
                      {
 
                        "name" :        "<name>"
 
                        "type" :        "<type>",
 
                      },
 
 
                    ]
 
            error:  null
 
        """
 
        repo = get_repo_or_error(repoid)
 

	
 
        if not HasPermissionAnyApi('hg.admin')(user=apiuser):
 
            # check if we have admin permission for this repo !
 
            perms = ('repository.admin', 'repository.write', 'repository.read')
 
            if not HasRepoPermissionAnyApi(*perms)(user=apiuser, repo_name=repo.repo_name):
 
                raise JSONRPCError('repository `%s` does not exist' % (repoid,))
 

	
 
        ret_type = Optional.extract(ret_type)
 
        _map = {}
 
        try:
 
            _d, _f = ScmModel().get_nodes(repo, revision, root_path,
 
                                          flat=False)
 
            _map = {
 
                'all': _d + _f,
 
                'files': _f,
 
                'dirs': _d,
 
            }
 
            return _map[ret_type]
 
        except KeyError:
 
            raise JSONRPCError('ret_type must be one of %s'
 
                               % (','.join(_map.keys())))
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            raise JSONRPCError(
 
                'failed to get repo: `%s` nodes' % repo.repo_name
 
            )
 

	
 
    @HasPermissionAnyDecorator('hg.admin', 'hg.create.repository')
 
    def create_repo(self, apiuser, repo_name, owner=Optional(OAttr('apiuser')),
 
                    repo_type=Optional('hg'), description=Optional(''),
 
                    private=Optional(False), clone_uri=Optional(None),
 
                    landing_rev=Optional('rev:tip'),
 
                    enable_statistics=Optional(False),
 
                    enable_locking=Optional(False),
 
                    enable_downloads=Optional(False),
 
                    copy_permissions=Optional(False)):
 
        """
 
        Creates a repository. If repository name contains "/", all needed repository
 
        groups will be created. For example "foo/bar/baz" will create groups
 
        "foo", "bar" (with "foo" as parent), and create "baz" repository with
 
        "bar" as group. This command can be executed only using api_key
 
        belonging to user with admin rights or regular user that have create
 
        repository permission. Regular users cannot specify owner parameter
 

	
 
        :param apiuser: filled automatically from apikey
 
        :type apiuser: AuthUser
 
        :param repo_name: repository name
 
        :type repo_name: str
 
        :param owner: user_id or username
 
        :type owner: Optional(str)
 
        :param repo_type: 'hg' or 'git'
 
        :type repo_type: Optional(str)
 
        :param description: repository description
 
        :type description: Optional(str)
 
        :param private:
 
        :type private: bool
 
        :param clone_uri:
 
        :type clone_uri: str
 
        :param landing_rev: <rev_type>:<rev>
 
        :type landing_rev: str
 
        :param enable_locking:
 
        :type enable_locking: bool
 
        :param enable_downloads:
 
        :type enable_downloads: bool
 
        :param enable_statistics:
 
        :type enable_statistics: bool
 
        :param copy_permissions: Copy permission from group that repository is
 
            being created.
 
        :type copy_permissions: bool
 

	
 
        OUTPUT::
 

	
 
            id : <id_given_in_input>
 
            result: {
 
                      "msg": "Created new repository `<reponame>`",
 
                      "success": true,
 
                      "task": "<celery task id or None if done sync>"
 
                    }
 
            error:  null
 

	
 
        ERROR OUTPUT::
 

	
 
          id : <id_given_in_input>
 
          result : null
 
          error :  {
 
             'failed to create repository `<repo_name>`
 
          }
 

	
 
        """
 
        if not HasPermissionAnyApi('hg.admin')(user=apiuser):
 
            if not isinstance(owner, Optional):
 
                #forbid setting owner for non-admins
 
                raise JSONRPCError(
 
                    'Only Kallithea admin can specify `owner` param'
 
                )
 
        if isinstance(owner, Optional):
 
            owner = apiuser.user_id
 

	
 
        owner = get_user_or_error(owner)
 

	
 
        if RepoModel().get_by_repo_name(repo_name):
 
            raise JSONRPCError("repo `%s` already exist" % repo_name)
 

	
 
        defs = Setting.get_default_repo_settings(strip_prefix=True)
 
        if isinstance(private, Optional):
 
            private = defs.get('repo_private') or Optional.extract(private)
 
        if isinstance(repo_type, Optional):
 
            repo_type = defs.get('repo_type')
 
        if isinstance(enable_statistics, Optional):
 
            enable_statistics = defs.get('repo_enable_statistics')
 
        if isinstance(enable_locking, Optional):
 
            enable_locking = defs.get('repo_enable_locking')
 
        if isinstance(enable_downloads, Optional):
 
            enable_downloads = defs.get('repo_enable_downloads')
 

	
 
        clone_uri = Optional.extract(clone_uri)
 
        description = Optional.extract(description)
 
        landing_rev = Optional.extract(landing_rev)
 
        copy_permissions = Optional.extract(copy_permissions)
 

	
 
        try:
 
            repo_name_cleaned = repo_name.split('/')[-1]
 
            # create structure of groups and return the last group
 
            repo_group = map_groups(repo_name)
 
            data = dict(
 
                repo_name=repo_name_cleaned,
 
                repo_name_full=repo_name,
 
                repo_type=repo_type,
 
                repo_description=description,
 
                owner=owner,
 
                repo_private=private,
 
                clone_uri=clone_uri,
 
                repo_group=repo_group,
 
                repo_landing_rev=landing_rev,
 
                enable_statistics=enable_statistics,
 
                enable_locking=enable_locking,
 
                enable_downloads=enable_downloads,
 
                repo_copy_permissions=copy_permissions,
 
            )
 

	
 
            task = RepoModel().create(form_data=data, cur_user=owner)
 
            from celery.result import BaseAsyncResult
 
            task_id = None
 
            if isinstance(task, BaseAsyncResult):
 
                task_id = task.task_id
 
            # no commit, it's done in RepoModel, or async via celery
 
            return dict(
 
                msg="Created new repository `%s`" % (repo_name,),
 
                success=True,  # cannot return the repo data here since fork
 
                               # can be done async
 
                task=task_id
 
            )
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            raise JSONRPCError(
 
                'failed to create repository `%s`' % (repo_name,))
 

	
 
    # permission check inside
 
    def update_repo(self, apiuser, repoid, name=Optional(None),
 
                    owner=Optional(OAttr('apiuser')),
 
                    group=Optional(None),
 
                    description=Optional(''), private=Optional(False),
 
                    clone_uri=Optional(None), landing_rev=Optional('rev:tip'),
 
                    enable_statistics=Optional(False),
 
                    enable_locking=Optional(False),
 
                    enable_downloads=Optional(False)):
 

	
 
        """
 
        Updates repo
 

	
 
        :param apiuser: filled automatically from apikey
 
        :type apiuser: AuthUser
 
        :param repoid: repository name or repository id
 
        :type repoid: str or int
 
        :param name:
 
        :param owner:
 
        :param group:
 
        :param description:
 
        :param private:
 
        :param clone_uri:
 
        :param landing_rev:
 
        :param enable_statistics:
 
        :param enable_locking:
 
        :param enable_downloads:
 
        """
 
        repo = get_repo_or_error(repoid)
 
        if not HasPermissionAnyApi('hg.admin')(user=apiuser):
 
            # check if we have admin permission for this repo !
 
            if not HasRepoPermissionAnyApi('repository.admin')(user=apiuser,
 
                                                               repo_name=repo.repo_name):
 
                raise JSONRPCError('repository `%s` does not exist' % (repoid,))
 

	
 
            if (name != repo.repo_name and
 
                not HasPermissionAnyApi('hg.create.repository')(user=apiuser)
 
                ):
 
                raise JSONRPCError('no permission to create (or move) repositories')
 

	
 
            if not isinstance(owner, Optional):
 
                #forbid setting owner for non-admins
 
                raise JSONRPCError(
 
                    'Only Kallithea admin can specify `owner` param'
 
                )
 

	
 
        updates = {
 
            # update function requires this.
 
            'repo_name': repo.repo_name
 
        }
 
        repo_group = group
 
        if not isinstance(repo_group, Optional):
 
            repo_group = get_repo_group_or_error(repo_group)
 
            repo_group = repo_group.group_id
 
        try:
 
            store_update(updates, name, 'repo_name')
 
            store_update(updates, repo_group, 'repo_group')
 
            store_update(updates, owner, 'user')
 
            store_update(updates, description, 'repo_description')
 
            store_update(updates, private, 'repo_private')
 
            store_update(updates, clone_uri, 'clone_uri')
 
            store_update(updates, landing_rev, 'repo_landing_rev')
 
            store_update(updates, enable_statistics, 'repo_enable_statistics')
 
            store_update(updates, enable_locking, 'repo_enable_locking')
 
            store_update(updates, enable_downloads, 'repo_enable_downloads')
 

	
 
            RepoModel().update(repo, **updates)
 
            Session().commit()
 
            return dict(
 
                msg='updated repo ID:%s %s' % (repo.repo_id, repo.repo_name),
 
                repository=repo.get_api_data()
 
            )
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            raise JSONRPCError('failed to update repo `%s`' % repoid)
 

	
 
    @HasPermissionAnyDecorator('hg.admin', 'hg.fork.repository')
 
    def fork_repo(self, apiuser, repoid, fork_name,
 
                  owner=Optional(OAttr('apiuser')),
 
                  description=Optional(''), copy_permissions=Optional(False),
 
                  private=Optional(False), landing_rev=Optional('rev:tip')):
 
        """
 
        Creates a fork of given repo. In case of using celery this will
 
        immediately return success message, while fork is going to be created
 
        asynchronous. This command can be executed only using api_key belonging to
 
        user with admin rights or regular user that have fork permission, and at least
 
        read access to forking repository. Regular users cannot specify owner parameter.
 

	
 
        :param apiuser: filled automatically from apikey
 
        :type apiuser: AuthUser
 
        :param repoid: repository name or repository id
 
        :type repoid: str or int
 
        :param fork_name:
 
        :param owner:
 
        :param description:
 
        :param copy_permissions:
 
        :param private:
 
        :param landing_rev:
 

	
 
        INPUT::
 

	
 
            id : <id_for_response>
 
            api_key : "<api_key>"
 
            args:     {
 
                        "repoid" :          "<reponame or repo_id>",
 
                        "fork_name":        "<forkname>",
 
                        "owner":            "<username or user_id = Optional(=apiuser)>",
 
                        "description":      "<description>",
 
                        "copy_permissions": "<bool>",
 
                        "private":          "<bool>",
 
                        "landing_rev":      "<landing_rev>"
 
                      }
 

	
 
        OUTPUT::
 

	
 
            id : <id_given_in_input>
 
            result: {
 
                      "msg": "Created fork of `<reponame>` as `<forkname>`",
 
                      "success": true,
 
                      "task": "<celery task id or None if done sync>"
 
                    }
 
            error:  null
 

	
 
        """
 
        repo = get_repo_or_error(repoid)
 
        repo_name = repo.repo_name
 

	
 
        _repo = RepoModel().get_by_repo_name(fork_name)
 
        if _repo:
 
            type_ = 'fork' if _repo.fork else 'repo'
 
            raise JSONRPCError("%s `%s` already exist" % (type_, fork_name))
 

	
 
        if HasPermissionAnyApi('hg.admin')(user=apiuser):
 
            pass
 
        elif HasRepoPermissionAnyApi('repository.admin',
 
                                     'repository.write',
 
                                     'repository.read')(user=apiuser,
 
                                                        repo_name=repo.repo_name):
 
            if not isinstance(owner, Optional):
 
                #forbid setting owner for non-admins
 
                raise JSONRPCError(
 
                    'Only Kallithea admin can specify `owner` param'
 
                )
 

	
 
            if not HasPermissionAnyApi('hg.create.repository')(user=apiuser):
 
                raise JSONRPCError('no permission to create repositories')
 
        else:
 
            raise JSONRPCError('repository `%s` does not exist' % (repoid,))
 

	
 
        if isinstance(owner, Optional):
 
            owner = apiuser.user_id
 

	
 
        owner = get_user_or_error(owner)
 

	
 
        try:
 
            # create structure of groups and return the last group
 
            group = map_groups(fork_name)
 

	
 
            form_data = dict(
 
                repo_name=fork_name,
 
                repo_name_full=fork_name,
 
                repo_group=group,
 
                repo_type=repo.repo_type,
 
                description=Optional.extract(description),
 
                private=Optional.extract(private),
 
                copy_permissions=Optional.extract(copy_permissions),
 
                landing_rev=Optional.extract(landing_rev),
 
                update_after_clone=False,
 
                fork_parent_id=repo.repo_id,
 
            )
 
            task = RepoModel().create_fork(form_data, cur_user=owner)
 
            # no commit, it's done in RepoModel, or async via celery
 
            from celery.result import BaseAsyncResult
 
            task_id = None
 
            if isinstance(task, BaseAsyncResult):
 
                task_id = task.task_id
 
            return dict(
 
                msg='Created fork of `%s` as `%s`' % (repo.repo_name,
 
                                                      fork_name),
 
                success=True,  # cannot return the repo data here since fork
 
                               # can be done async
 
                task=task_id
 
            )
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            raise JSONRPCError(
 
                'failed to fork repository `%s` as `%s`' % (repo_name,
 
                                                            fork_name)
 
            )
 

	
 
    # permission check inside
 
    def delete_repo(self, apiuser, repoid, forks=Optional('')):
 
        """
 
        Deletes a repository. This command can be executed only using api_key belonging
 
        to user with admin rights or regular user that have admin access to repository.
 
        When `forks` param is set it's possible to detach or delete forks of deleting
 
        repository
 

	
 
        :param apiuser: filled automatically from apikey
 
        :type apiuser: AuthUser
 
        :param repoid: repository name or repository id
 
        :type repoid: str or int
 
        :param forks: `detach` or `delete`, what do do with attached forks for repo
 
        :type forks: Optional(str)
 

	
 
        OUTPUT::
 

	
 
            id : <id_given_in_input>
 
            result: {
 
                      "msg": "Deleted repository `<reponame>`",
 
                      "success": true
 
                    }
 
            error:  null
 

	
 
        """
 
        repo = get_repo_or_error(repoid)
 

	
 
        if not HasPermissionAnyApi('hg.admin')(user=apiuser):
 
            # check if we have admin permission for this repo !
 
            if not HasRepoPermissionAnyApi('repository.admin')(user=apiuser,
 
                                                           repo_name=repo.repo_name):
 
                raise JSONRPCError('repository `%s` does not exist' % (repoid,))
 

	
 
        try:
 
            handle_forks = Optional.extract(forks)
 
            _forks_msg = ''
 
            _forks = [f for f in repo.forks]
 
            if handle_forks == 'detach':
 
                _forks_msg = ' ' + 'Detached %s forks' % len(_forks)
 
            elif handle_forks == 'delete':
 
                _forks_msg = ' ' + 'Deleted %s forks' % len(_forks)
 
            elif _forks:
 
                raise JSONRPCError(
 
                    'Cannot delete `%s` it still contains attached forks' %
 
                    (repo.repo_name,)
 
                )
 

	
 
            RepoModel().delete(repo, forks=forks)
 
            Session().commit()
 
            return dict(
 
                msg='Deleted repository `%s`%s' % (repo.repo_name, _forks_msg),
 
                success=True
 
            )
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            raise JSONRPCError(
 
                'failed to delete repository `%s`' % (repo.repo_name,)
 
            )
 

	
 
    @HasPermissionAllDecorator('hg.admin')
 
    def grant_user_permission(self, apiuser, repoid, userid, perm):
 
        """
 
        Grant permission for user on given repository, or update existing one
 
        if found. This command can be executed only using api_key belonging to user
 
        with admin rights.
 

	
 
        :param apiuser: filled automatically from apikey
 
        :type apiuser: AuthUser
 
        :param repoid: repository name or repository id
 
        :type repoid: str or int
 
        :param userid:
 
        :param perm: (repository.(none|read|write|admin))
 
        :type perm: str
 

	
 
        OUTPUT::
 

	
 
            id : <id_given_in_input>
 
            result: {
 
                      "msg" : "Granted perm: `<perm>` for user: `<username>` in repo: `<reponame>`",
 
                      "success": true
 
                    }
 
            error:  null
 
        """
 
        repo = get_repo_or_error(repoid)
 
        user = get_user_or_error(userid)
 
        perm = get_perm_or_error(perm)
 

	
 
        try:
 

	
 
            RepoModel().grant_user_permission(repo=repo, user=user, perm=perm)
 

	
 
            Session().commit()
 
            return dict(
 
                msg='Granted perm: `%s` for user: `%s` in repo: `%s`' % (
 
                    perm.permission_name, user.username, repo.repo_name
 
                ),
 
                success=True
 
            )
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            raise JSONRPCError(
 
                'failed to edit permission for user: `%s` in repo: `%s`' % (
 
                    userid, repoid
 
                )
 
            )
 

	
 
    @HasPermissionAllDecorator('hg.admin')
 
    def revoke_user_permission(self, apiuser, repoid, userid):
 
        """
 
        Revoke permission for user on given repository. This command can be executed
 
        only using api_key belonging to user with admin rights.
 

	
 
        :param apiuser: filled automatically from apikey
 
        :type apiuser: AuthUser
 
        :param repoid: repository name or repository id
 
        :type repoid: str or int
 
        :param userid:
 

	
 
        OUTPUT::
 

	
 
            id : <id_given_in_input>
 
            result: {
 
                      "msg" : "Revoked perm for user: `<username>` in repo: `<reponame>`",
 
                      "success": true
 
                    }
 
            error:  null
 

	
 
        """
 

	
 
        repo = get_repo_or_error(repoid)
 
        user = get_user_or_error(userid)
 
        try:
 
            RepoModel().revoke_user_permission(repo=repo, user=user)
 
            Session().commit()
 
            return dict(
 
                msg='Revoked perm for user: `%s` in repo: `%s`' % (
 
                    user.username, repo.repo_name
 
                ),
 
                success=True
 
            )
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            raise JSONRPCError(
 
                'failed to edit permission for user: `%s` in repo: `%s`' % (
 
                    userid, repoid
 
                )
 
            )
 

	
 
    # permission check inside
 
    def grant_user_group_permission(self, apiuser, repoid, usergroupid, perm):
 
        """
 
        Grant permission for user group on given repository, or update
 
        existing one if found. This command can be executed only using
 
        api_key belonging to user with admin rights.
 

	
 
        :param apiuser: filled automatically from apikey
 
        :type apiuser: AuthUser
 
        :param repoid: repository name or repository id
 
        :type repoid: str or int
 
        :param usergroupid: id of usergroup
 
        :type usergroupid: str or int
 
        :param perm: (repository.(none|read|write|admin))
 
        :type perm: str
 

	
 
        OUTPUT::
 

	
 
          id : <id_given_in_input>
 
          result : {
 
            "msg" : "Granted perm: `<perm>` for group: `<usersgroupname>` in repo: `<reponame>`",
 
            "success": true
 

	
 
          }
 
          error :  null
 

	
 
        ERROR OUTPUT::
 

	
 
          id : <id_given_in_input>
 
          result : null
 
          error :  {
 
            "failed to edit permission for user group: `<usergroup>` in repo `<repo>`'
 
          }
 

	
 
        """
 
        repo = get_repo_or_error(repoid)
 
        perm = get_perm_or_error(perm)
 
        user_group = get_user_group_or_error(usergroupid)
 
        if not HasPermissionAnyApi('hg.admin')(user=apiuser):
 
            # check if we have admin permission for this repo !
 
            _perms = ('repository.admin',)
 
            if not HasRepoPermissionAnyApi(*_perms)(
 
                    user=apiuser, repo_name=repo.repo_name):
 
                raise JSONRPCError('repository `%s` does not exist' % (repoid,))
 

	
 
            # check if we have at least read permission for this user group !
 
            _perms = ('usergroup.read', 'usergroup.write', 'usergroup.admin',)
 
            if not HasUserGroupPermissionAny(*_perms)(
 
                    user=apiuser, user_group_name=user_group.users_group_name):
 
                raise JSONRPCError('user group `%s` does not exist' % (usergroupid,))
 

	
 
        try:
 
            RepoModel().grant_user_group_permission(
 
                repo=repo, group_name=user_group, perm=perm)
 

	
 
            Session().commit()
 
            return dict(
 
                msg='Granted perm: `%s` for user group: `%s` in '
 
                    'repo: `%s`' % (
 
                        perm.permission_name, user_group.users_group_name,
 
                        repo.repo_name
 
                    ),
 
                success=True
 
            )
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            raise JSONRPCError(
 
                'failed to edit permission for user group: `%s` in '
 
                'repo: `%s`' % (
 
                    usergroupid, repo.repo_name
 
                )
 
            )
 

	
 
    # permission check inside
 
    def revoke_user_group_permission(self, apiuser, repoid, usergroupid):
 
        """
 
        Revoke permission for user group on given repository. This command can be
 
        executed only using api_key belonging to user with admin rights.
 

	
 
        :param apiuser: filled automatically from apikey
 
        :type apiuser: AuthUser
 
        :param repoid: repository name or repository id
 
        :type repoid: str or int
 
        :param usergroupid:
 

	
 
        OUTPUT::
 

	
 
            id : <id_given_in_input>
 
            result: {
 
                      "msg" : "Revoked perm for group: `<usersgroupname>` in repo: `<reponame>`",
 
                      "success": true
 
                    }
 
            error:  null
 
        """
 
        repo = get_repo_or_error(repoid)
 
        user_group = get_user_group_or_error(usergroupid)
 
        if not HasPermissionAnyApi('hg.admin')(user=apiuser):
 
            # check if we have admin permission for this repo !
 
            _perms = ('repository.admin',)
 
            if not HasRepoPermissionAnyApi(*_perms)(
 
                    user=apiuser, repo_name=repo.repo_name):
 
                raise JSONRPCError('repository `%s` does not exist' % (repoid,))
 

	
 
            # check if we have at least read permission for this user group !
 
            _perms = ('usergroup.read', 'usergroup.write', 'usergroup.admin',)
 
            if not HasUserGroupPermissionAny(*_perms)(
 
                    user=apiuser, user_group_name=user_group.users_group_name):
 
                raise JSONRPCError('user group `%s` does not exist' % (usergroupid,))
 

	
 
        try:
 
            RepoModel().revoke_user_group_permission(
 
                repo=repo, group_name=user_group)
 

	
 
            Session().commit()
 
            return dict(
 
                msg='Revoked perm for user group: `%s` in repo: `%s`' % (
 
                    user_group.users_group_name, repo.repo_name
 
                ),
 
                success=True
 
            )
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            raise JSONRPCError(
 
                'failed to edit permission for user group: `%s` in '
 
                'repo: `%s`' % (
 
                    user_group.users_group_name, repo.repo_name
 
                )
 
            )
 

	
 
    @HasPermissionAllDecorator('hg.admin')
 
    def get_repo_group(self, apiuser, repogroupid):
 
        """
 
        Returns given repo group together with permissions, and repositories
 
        inside the group
 

	
 
        :param apiuser: filled automatically from apikey
 
        :type apiuser: AuthUser
 
        :param repogroupid: id/name of repository group
 
        :type repogroupid: str or int
 
        """
 
        repo_group = get_repo_group_or_error(repogroupid)
 

	
 
        members = []
 
        for user in repo_group.repo_group_to_perm:
 
            perm = user.permission.permission_name
 
            user = user.user
 
            user_data = {
 
                'name': user.username,
 
                'type': "user",
 
                'permission': perm
 
            }
 
            members.append(user_data)
 

	
 
        for user_group in repo_group.users_group_to_perm:
 
            perm = user_group.permission.permission_name
 
            user_group = user_group.users_group
 
            user_group_data = {
 
                'name': user_group.users_group_name,
 
                'type': "user_group",
 
                'permission': perm
 
            }
 
            members.append(user_group_data)
 

	
 
        data = repo_group.get_api_data()
 
        data["members"] = members
 
        return data
 

	
 
    @HasPermissionAllDecorator('hg.admin')
 
    def get_repo_groups(self, apiuser):
 
        """
 
        Returns all repository groups
 

	
 
        :param apiuser: filled automatically from apikey
 
        :type apiuser: AuthUser
 
        """
 
        result = []
 
        for repo_group in RepoGroupModel().get_all():
 
            result.append(repo_group.get_api_data())
 
        return result
 

	
 
    @HasPermissionAllDecorator('hg.admin')
 
    def create_repo_group(self, apiuser, group_name, description=Optional(''),
 
                          owner=Optional(OAttr('apiuser')),
 
                          parent=Optional(None),
 
                          copy_permissions=Optional(False)):
 
        """
 
        Creates a repository group. This command can be executed only using
 
        api_key belonging to user with admin rights.
 

	
 
        :param apiuser: filled automatically from apikey
 
        :type apiuser: AuthUser
 
        :param group_name:
kallithea/i18n/be/LC_MESSAGES/kallithea.po
Show inline comments
 
@@ -626,777 +626,777 @@ msgstr "Адключана"
 
msgid "Allowed with manual account activation"
 
msgstr "Дазволена, з ручной актывацыяй уліковага запісу"
 

	
 
#: kallithea/controllers/admin/permissions.py:80
 
msgid "Allowed with automatic account activation"
 
msgstr "Дазволена, з аўтаматычнай актывацыяй уліковага запісу"
 

	
 
#: kallithea/controllers/admin/permissions.py:83
 
#: kallithea/lib/dbmigrate/schema/db_1_7_0.py:1439
 
#: kallithea/lib/dbmigrate/schema/db_1_8_0.py:1485
 
#: kallithea/lib/dbmigrate/schema/db_2_0_0.py:1542
 
#: kallithea/lib/dbmigrate/schema/db_2_0_1.py:1543
 
#: kallithea/lib/dbmigrate/schema/db_2_0_2.py:1564
 
#: kallithea/lib/dbmigrate/schema/db_2_1_0.py:1603
 
#: kallithea/lib/dbmigrate/schema/db_2_2_0.py:1655
 
#: kallithea/lib/dbmigrate/schema/db_2_2_3.py:1682 kallithea/model/db.py:1684
 
msgid "Manual activation of external account"
 
msgstr "Ручная актывацыя вонкавага ўліковага запісу"
 

	
 
#: kallithea/controllers/admin/permissions.py:84
 
#: kallithea/lib/dbmigrate/schema/db_1_7_0.py:1440
 
#: kallithea/lib/dbmigrate/schema/db_1_8_0.py:1486
 
#: kallithea/lib/dbmigrate/schema/db_2_0_0.py:1543
 
#: kallithea/lib/dbmigrate/schema/db_2_0_1.py:1544
 
#: kallithea/lib/dbmigrate/schema/db_2_0_2.py:1565
 
#: kallithea/lib/dbmigrate/schema/db_2_1_0.py:1604
 
#: kallithea/lib/dbmigrate/schema/db_2_2_0.py:1656
 
#: kallithea/lib/dbmigrate/schema/db_2_2_3.py:1683 kallithea/model/db.py:1685
 
msgid "Automatic activation of external account"
 
msgstr "Аўтаматычная актывацыя вонкавага ўліковага запісу"
 

	
 
#: kallithea/controllers/admin/permissions.py:88
 
#: kallithea/controllers/admin/permissions.py:91
 
#: kallithea/controllers/admin/permissions.py:96
 
#: kallithea/controllers/admin/permissions.py:99
 
#: kallithea/controllers/admin/permissions.py:102
 
msgid "Enabled"
 
msgstr "Уключана"
 

	
 
#: kallithea/controllers/admin/permissions.py:125
 
msgid "Global permissions updated successfully"
 
msgstr "Глабальныя прывілеі паспяхова абноўлены"
 

	
 
#: kallithea/controllers/admin/permissions.py:140
 
msgid "Error occurred during update of permissions"
 
msgstr "Адбылася памылка падчас абнаўлення прывілеяў"
 

	
 
#: kallithea/controllers/admin/repo_groups.py:184
 
#, python-format
 
msgid "Created repository group %s"
 
msgstr "Створана новая група рэпазітароў %s"
 

	
 
#: kallithea/controllers/admin/repo_groups.py:197
 
#, python-format
 
msgid "Error occurred during creation of repository group %s"
 
msgstr "Адбылася памылка пры стварэнні групы рэпазітароў %s"
 

	
 
#: kallithea/controllers/admin/repo_groups.py:255
 
#, python-format
 
msgid "Updated repository group %s"
 
msgstr "Група рэпазітароў %s абноўлена"
 

	
 
#: kallithea/controllers/admin/repo_groups.py:271
 
#, python-format
 
msgid "Error occurred during update of repository group %s"
 
msgstr "Адбылася памылка пры абнаўленні групы рэпазітароў %s"
 

	
 
#: kallithea/controllers/admin/repo_groups.py:289
 
#, python-format
 
msgid "This group contains %s repositories and cannot be deleted"
 
msgstr "Дадзеная група ўтрымоўвае %s рэпазітароў і не можа быць выдалена"
 

	
 
#: kallithea/controllers/admin/repo_groups.py:296
 
#, python-format
 
msgid "This group contains %s subgroups and cannot be deleted"
 
msgstr "Група ўтрымоўвае ў сабе %s падгруп і не можа быць выдалены"
 

	
 
#: kallithea/controllers/admin/repo_groups.py:302
 
#, python-format
 
msgid "Removed repository group %s"
 
msgstr "Група рэпазітароў %s выдалена"
 

	
 
#: kallithea/controllers/admin/repo_groups.py:307
 
#, python-format
 
msgid "Error occurred during deletion of repository group %s"
 
msgstr "Адбылася памылка пры выдаленні групы рэпазітароў %s"
 

	
 
#: kallithea/controllers/admin/repo_groups.py:420
 
#: kallithea/controllers/admin/repo_groups.py:455
 
#: kallithea/controllers/admin/user_groups.py:340
 
msgid "Cannot revoke permission for yourself as admin"
 
msgstr "Адміністратар не можа адклікаць свае прывелеі"
 

	
 
#: kallithea/controllers/admin/repo_groups.py:435
 
msgid "Repository Group permissions updated"
 
msgstr "Прывілеі групы рэпазітароў абноўлены"
 

	
 
#: kallithea/controllers/admin/repo_groups.py:472
 
#: kallithea/controllers/admin/repos.py:430
 
#: kallithea/controllers/admin/user_groups.py:352
 
msgid "An error occurred during revoking of permission"
 
msgstr "Адбылася памылка пры водгуку прывелеі"
 

	
 
#: kallithea/controllers/admin/repos.py:163
 
#, python-format
 
msgid "Error creating repository %s"
 
msgstr "Адбылася памылка пры стварэнні рэпазітара %s"
 

	
 
#: kallithea/controllers/admin/repos.py:238
 
#, python-format
 
msgid "Created repository %s from %s"
 
msgstr "Рэпазітар %s створаны з %s"
 

	
 
#: kallithea/controllers/admin/repos.py:247
 
#, python-format
 
msgid "Forked repository %s as %s"
 
msgstr "Зроблены форк(копія) рэпазітара %s на %s"
 

	
 
#: kallithea/controllers/admin/repos.py:250
 
#, python-format
 
msgid "Created repository %s"
 
msgstr "Рэпазітар %s створаны"
 

	
 
#: kallithea/controllers/admin/repos.py:290
 
#, python-format
 
msgid "Repository %s updated successfully"
 
msgstr "Рэпазітар %s паспяхова абноўлены"
 

	
 
#: kallithea/controllers/admin/repos.py:309
 
#, python-format
 
msgid "Error occurred during update of repository %s"
 
msgstr "Адбылася памылка падчас абнаўлення рэпазітара %s"
 

	
 
#: kallithea/controllers/admin/repos.py:336
 
#, python-format
 
msgid "Detached %s forks"
 
msgstr "Форки %s адлучаны"
 

	
 
#: kallithea/controllers/admin/repos.py:339
 
#, python-format
 
msgid "Deleted %s forks"
 
msgstr "Выдалены форки рэпазітара %s"
 

	
 
#: kallithea/controllers/admin/repos.py:344
 
#, python-format
 
msgid "Deleted repository %s"
 
msgstr "Рэпазітар %s выдалены"
 

	
 
#: kallithea/controllers/admin/repos.py:347
 
#, python-format
 
msgid "Cannot delete %s it still contains attached forks"
 
msgstr "Немагчыма выдаліць %s, ён усё-яшчэ ўтрымоўвае форки"
 

	
 
#: kallithea/controllers/admin/repos.py:352
 
#, python-format
 
msgid "An error occurred during deletion of %s"
 
msgstr "Адбылася памылка падчас выдалення %s"
 

	
 
#: kallithea/controllers/admin/repos.py:406
 
msgid "Repository permissions updated"
 
msgstr "Прывілеі рэпазітара абноўлены"
 

	
 
#: kallithea/controllers/admin/repos.py:462
 
msgid "An error occurred during creation of field"
 
msgstr "Адбылася памылка пры стварэнні поля"
 

	
 
#: kallithea/controllers/admin/repos.py:476
 
msgid "An error occurred during removal of field"
 
msgstr "Адбылася памылка пры выдаленні поля"
 

	
 
#: kallithea/controllers/admin/repos.py:492
 
msgid "-- Not a fork --"
 
msgstr "-- Не форк --"
 

	
 
#: kallithea/controllers/admin/repos.py:526
 
msgid "Updated repository visibility in public journal"
 
msgstr "Бачнасць рэпазітара ў публічным часопісе абноўлена"
 

	
 
#: kallithea/controllers/admin/repos.py:530
 
msgid "An error occurred during setting this repository in public journal"
 
msgstr "Адбылася памылка пры ўсталёўцы рэпазітара ў агульнадаступны часопіс"
 

	
 
#: kallithea/controllers/admin/repos.py:535 kallithea/model/validators.py:340
 
msgid "Token mismatch"
 
msgstr "Несупадзенне токенаў"
 

	
 
#: kallithea/controllers/admin/repos.py:550
 
msgid "Nothing"
 
msgstr "Нічога"
 

	
 
#: kallithea/controllers/admin/repos.py:552
 
#, python-format
 
msgid "Marked repo %s as fork of %s"
 
msgstr "Рэпазітар %s адзначаны як форк %s"
 

	
 
#: kallithea/controllers/admin/repos.py:559
 
msgid "An error occurred during this operation"
 
msgstr "Адбылася памылка пры выкананні аперацыі"
 

	
 
#: kallithea/controllers/admin/repos.py:575
 
msgid "Locked repository"
 
msgstr "Зачынены рэпазітар"
 

	
 
#: kallithea/controllers/admin/repos.py:578
 
msgid "Unlocked repository"
 
msgstr "Адкрыты рэпазітар"
 

	
 
#: kallithea/controllers/admin/repos.py:581
 
#: kallithea/controllers/admin/repos.py:608
 
msgid "An error occurred during unlocking"
 
msgstr "Адбылася памылка падчас разблакавання"
 

	
 
#: kallithea/controllers/admin/repos.py:599
 
msgid "Unlocked"
 
msgstr "Разблакавана"
 

	
 
#: kallithea/controllers/admin/repos.py:602
 
msgid "Locked"
 
msgstr "Заблакавана"
 

	
 
#: kallithea/controllers/admin/repos.py:604
 
#, python-format
 
msgid "Repository has been %s"
 
msgstr "Рэпазітар %s"
 

	
 
#: kallithea/controllers/admin/repos.py:622
 
msgid "Cache invalidation successful"
 
msgstr "Кэш скінуты"
 

	
 
#: kallithea/controllers/admin/repos.py:626
 
msgid "An error occurred during cache invalidation"
 
msgstr "Адбылася памылка пры ачыстцы кэша"
 

	
 
#: kallithea/controllers/admin/repos.py:641
 
msgid "Pulled from remote location"
 
msgstr "Занесены змены з выдаленага рэпазітара"
 

	
 
#: kallithea/controllers/admin/repos.py:644
 
msgid "An error occurred during pull from remote location"
 
msgstr "Адбылася памылка пры занясенні змен з выдаленага рэпазітара"
 

	
 
#: kallithea/controllers/admin/repos.py:677
 
msgid "An error occurred during deletion of repository stats"
 
msgstr "Адбылася памылка пры выдаленні статыстыкі рэпазітара"
 

	
 
#: kallithea/controllers/admin/settings.py:170
 
msgid "Updated VCS settings"
 
msgstr "Абноўлены налады VCS"
 

	
 
#: kallithea/controllers/admin/settings.py:174
 
msgid ""
 
"Unable to activate hgsubversion support. The \"hgsubversion\" library is "
 
"missing"
 
msgstr ""
 
"Немагчыма ўключыць падтрымку hgsubversion. Бібліятэка «hgsubversion» "
 
"адсутнічае"
 

	
 
#: kallithea/controllers/admin/settings.py:180
 
#: kallithea/controllers/admin/settings.py:274
 
msgid "Error occurred during updating application settings"
 
msgstr "Адбылася памылка пры абнаўленні налад прыкладання"
 

	
 
#: kallithea/controllers/admin/settings.py:213
 
#, python-format
 
msgid "Repositories successfully rescanned. Added: %s. Removed: %s."
 
msgstr "Рэпазітары паспяхова перасканіраваны, дададзена: %s, выдалена: %s."
 

	
 
#: kallithea/controllers/admin/settings.py:270
 
msgid "Updated application settings"
 
msgstr "Абноўленыя параметры налады прыкладання"
 

	
 
#: kallithea/controllers/admin/settings.py:327
 
msgid "Updated visualisation settings"
 
msgstr "Налады візуалізацыі абноўлены"
 

	
 
#: kallithea/controllers/admin/settings.py:332
 
msgid "Error occurred during updating visualisation settings"
 
msgstr "Адбылася памылка пры абнаўленні налад візуалізацыі"
 

	
 
#: kallithea/controllers/admin/settings.py:358
 
msgid "Please enter email address"
 
msgstr "Калі ласка, увядзіце адрас электроннай пошты"
 

	
 
#: kallithea/controllers/admin/settings.py:373
 
msgid "Send email task created"
 
msgstr "Задача адпраўкі Email створана"
 

	
 
#: kallithea/controllers/admin/settings.py:404
 
msgid "Added new hook"
 
msgstr "Дададзена новая пастка"
 

	
 
#: kallithea/controllers/admin/settings.py:418
 
msgid "Updated hooks"
 
msgstr "Абноўленыя пасткі"
 

	
 
#: kallithea/controllers/admin/settings.py:422
 
msgid "Error occurred during hook creation"
 
msgstr "адбылася памылка пры стварэнні хука"
 

	
 
#: kallithea/controllers/admin/settings.py:448
 
msgid "Whoosh reindex task scheduled"
 
msgstr "Запланавана пераіндэксаванне базы Whoosh"
 

	
 
#: kallithea/controllers/admin/user_groups.py:150
 
#, python-format
 
msgid "Created user group %s"
 
msgstr "Створана група карыстачоў %s"
 

	
 
#: kallithea/controllers/admin/user_groups.py:163
 
#, python-format
 
msgid "Error occurred during creation of user group %s"
 
msgstr "Адбылася памылка пры стварэнні групы карыстачоў %s"
 

	
 
#: kallithea/controllers/admin/user_groups.py:201
 
#, python-format
 
msgid "Updated user group %s"
 
msgstr "Група карыстачоў %s абноўлена"
 

	
 
#: kallithea/controllers/admin/user_groups.py:224
 
#, python-format
 
msgid "Error occurred during update of user group %s"
 
msgstr "Адбылася памылка пры абнаўленні групы карыстачоў %s"
 

	
 
#: kallithea/controllers/admin/user_groups.py:242
 
msgid "Successfully deleted user group"
 
msgstr "Група карыстачоў паспяхова выдалена"
 

	
 
#: kallithea/controllers/admin/user_groups.py:247
 
msgid "An error occurred during deletion of user group"
 
msgstr "Адбылася памылка пры выдаленні групы карыстачоў"
 

	
 
#: kallithea/controllers/admin/user_groups.py:314
 
msgid "Target group cannot be the same"
 
msgstr "Мэтавая група не можа быць такі ж"
 

	
 
#: kallithea/controllers/admin/user_groups.py:320
 
msgid "User Group permissions updated"
 
msgstr "Прывілеі групы карыстачоў абноўлены"
 

	
 
#: kallithea/controllers/admin/user_groups.py:440
 
#: kallithea/controllers/admin/users.py:396
 
msgid "Updated permissions"
 
msgstr "Абноўлены прывілеі"
 

	
 
#: kallithea/controllers/admin/user_groups.py:444
 
#: kallithea/controllers/admin/users.py:400
 
msgid "An error occurred during permissions saving"
 
msgstr "Адбылася памылка пры захаванні прывілеяў"
 

	
 
#: kallithea/controllers/admin/users.py:132
 
#, python-format
 
msgid "Created user %s"
 
msgstr "Карыстач %s створаны"
 

	
 
#: kallithea/controllers/admin/users.py:147
 
#, python-format
 
msgid "Error occurred during creation of user %s"
 
msgstr "Адбылася памылка пры стварэнні карыстача %s"
 

	
 
#: kallithea/controllers/admin/users.py:186
 
msgid "User updated successfully"
 
msgstr "Карыстач паспяхова абноўлены"
 

	
 
#: kallithea/controllers/admin/users.py:222
 
msgid "Successfully deleted user"
 
msgstr "Карыстач паспяхова выдалены"
 

	
 
#: kallithea/controllers/admin/users.py:227
 
msgid "An error occurred during deletion of user"
 
msgstr "Адбылася памылка пры выдаленні карыстача"
 

	
 
#: kallithea/controllers/admin/users.py:241
 
#: kallithea/controllers/admin/users.py:259
 
#: kallithea/controllers/admin/users.py:282
 
#: kallithea/controllers/admin/users.py:307
 
#: kallithea/controllers/admin/users.py:320
 
#: kallithea/controllers/admin/users.py:344
 
#: kallithea/controllers/admin/users.py:407
 
#: kallithea/controllers/admin/users.py:454
 
msgid "You can't edit this user"
 
msgstr "Вы не можаце рэдагаваць дадзенага карыстача"
 

	
 
#: kallithea/controllers/admin/users.py:482
 
#, python-format
 
msgid "Added IP address %s to user whitelist"
 
msgid "Added ip %s to user whitelist"
 
msgstr "Дададзены IP %s у белы спіс карыстача"
 

	
 
#: kallithea/controllers/admin/users.py:488
 
msgid "An error occurred during ip saving"
 
msgstr "Адбылася памылка пры захаванні IP"
 

	
 
#: kallithea/controllers/admin/users.py:502
 
msgid "Removed IP address from user whitelist"
 
msgid "Removed ip address from user whitelist"
 
msgstr "Выдалены IP %s з белага спісу карыстача"
 

	
 
#: kallithea/lib/auth.py:745
 
#, python-format
 
msgid "IP %s not allowed"
 
msgstr "IP %s заблакаваны"
 

	
 
#: kallithea/lib/auth.py:806
 
msgid "You need to be a registered user to perform this action"
 
msgstr "Вы павінны быць зарэгістраваным карыстачом, каб выканаць гэта дзеянне"
 

	
 
#: kallithea/lib/auth.py:843
 
msgid "You need to be signed in to view this page"
 
msgstr "Старонка даступная толькі аўтарызаваным карыстачам"
 

	
 
#: kallithea/lib/base.py:427
 
msgid "Repository not found in the filesystem"
 
msgstr "Рэпазітар не знойдзены на файлавай сістэме"
 

	
 
#: kallithea/lib/base.py:453 kallithea/lib/helpers.py:643
 
msgid "Changeset not found"
 
msgstr "Набор змен не знойдзены"
 

	
 
#: kallithea/lib/diffs.py:66
 
msgid "Binary file"
 
msgstr "Двайковы файл"
 

	
 
#: kallithea/lib/diffs.py:82
 
msgid ""
 
"Changeset was too big and was cut off, use diff menu to display this diff"
 
msgstr ""
 
"Набор змены апынуўся занадта вялікімі і быў падрэзаны, выкарыстоўвайце меню "
 
"параўнання для паказу выніку параўнання"
 

	
 
#: kallithea/lib/diffs.py:92
 
msgid "No changes detected"
 
msgstr "Змен не выяўлена"
 

	
 
#: kallithea/lib/helpers.py:627
 
#, python-format
 
msgid "Deleted branch: %s"
 
msgstr "Выдалена галінка: %s"
 

	
 
#: kallithea/lib/helpers.py:630
 
#, python-format
 
msgid "Created tag: %s"
 
msgstr "Створаны тэг: %s"
 

	
 
#: kallithea/lib/helpers.py:693
 
#, python-format
 
msgid "Show all combined changesets %s->%s"
 
msgstr "Паказаць адрозненні разам %s->%s"
 

	
 
#: kallithea/lib/helpers.py:699
 
msgid "compare view"
 
msgstr "параўнанне"
 

	
 
#: kallithea/lib/helpers.py:718
 
msgid "and"
 
msgstr "і"
 

	
 
#: kallithea/lib/helpers.py:719
 
#, python-format
 
msgid "%s more"
 
msgstr "на %s больш"
 

	
 
#: kallithea/lib/helpers.py:720
 
#: kallithea/templates/changelog/changelog.html:44
 
msgid "revisions"
 
msgstr "версіі"
 

	
 
#: kallithea/lib/helpers.py:744
 
#, python-format
 
msgid "fork name %s"
 
msgstr "імя форка %s"
 

	
 
#: kallithea/lib/helpers.py:761
 
#, python-format
 
msgid "Pull request #%s"
 
msgstr "Pull-запыт #%s"
 

	
 
#: kallithea/lib/helpers.py:771
 
msgid "[deleted] repository"
 
msgstr "[выдалены] рэпазітар"
 

	
 
#: kallithea/lib/helpers.py:773 kallithea/lib/helpers.py:785
 
msgid "[created] repository"
 
msgstr "[створаны] рэпазітар"
 

	
 
#: kallithea/lib/helpers.py:775
 
msgid "[created] repository as fork"
 
msgstr "[створаны] рэпазітар як форк"
 

	
 
#: kallithea/lib/helpers.py:777 kallithea/lib/helpers.py:787
 
msgid "[forked] repository"
 
msgstr "[форкнуты] рэпазітар"
 

	
 
#: kallithea/lib/helpers.py:779 kallithea/lib/helpers.py:789
 
msgid "[updated] repository"
 
msgstr "[абноўлены] рэпазітар"
 

	
 
#: kallithea/lib/helpers.py:781
 
msgid "[downloaded] archive from repository"
 
msgstr "[загружаны] архіў з рэпазітара"
 

	
 
#: kallithea/lib/helpers.py:783
 
msgid "[delete] repository"
 
msgstr "[выдалены] рэпазітар"
 

	
 
#: kallithea/lib/helpers.py:791
 
msgid "[created] user"
 
msgstr "[створаны] карыстач"
 

	
 
#: kallithea/lib/helpers.py:793
 
msgid "[updated] user"
 
msgstr "[абноўлены] карыстач"
 

	
 
#: kallithea/lib/helpers.py:795
 
msgid "[created] user group"
 
msgstr "[створана] група карыстачоў"
 

	
 
#: kallithea/lib/helpers.py:797
 
msgid "[updated] user group"
 
msgstr "[абноўлена] група карыстачоў"
 

	
 
#: kallithea/lib/helpers.py:799
 
msgid "[commented] on revision in repository"
 
msgstr "[каментар] да рэвізіі ў рэпазітары"
 

	
 
#: kallithea/lib/helpers.py:801
 
msgid "[commented] on pull request for"
 
msgstr "[пракаменціравана] у запыце на занясенне змен для"
 

	
 
#: kallithea/lib/helpers.py:803
 
msgid "[closed] pull request for"
 
msgstr "[зачынены] Pull-запыт для"
 

	
 
#: kallithea/lib/helpers.py:805
 
msgid "[pushed] into"
 
msgstr "[адпраўлена] у"
 

	
 
#: kallithea/lib/helpers.py:807
 
msgid "[committed via Kallithea] into repository"
 
msgstr "[занесены змены з дапамогай Kallithea] у рэпазітары"
 

	
 
#: kallithea/lib/helpers.py:809
 
msgid "[pulled from remote] into repository"
 
msgstr "[занесены змены з выдаленага рэпазітара] у рэпазітар"
 

	
 
#: kallithea/lib/helpers.py:811
 
msgid "[pulled] from"
 
msgstr "[занесены змены] з"
 

	
 
#: kallithea/lib/helpers.py:813
 
msgid "[started following] repository"
 
msgstr "[дададзены ў назіранні] рэпазітар"
 

	
 
#: kallithea/lib/helpers.py:815
 
msgid "[stopped following] repository"
 
msgstr "[выдалены з назірання] рэпазітар"
 

	
 
#: kallithea/lib/helpers.py:1144
 
#, python-format
 
msgid " and %s more"
 
msgstr " і на %s больш"
 

	
 
#: kallithea/lib/helpers.py:1148
 
msgid "No Files"
 
msgstr "Файлаў няма"
 

	
 
#: kallithea/lib/helpers.py:1214
 
msgid "new file"
 
msgstr "новы файл"
 

	
 
#: kallithea/lib/helpers.py:1217
 
msgid "mod"
 
msgstr "зменены"
 

	
 
#: kallithea/lib/helpers.py:1220
 
msgid "del"
 
msgstr "выдалены"
 

	
 
#: kallithea/lib/helpers.py:1223
 
msgid "rename"
 
msgstr "пераназваны"
 

	
 
#: kallithea/lib/helpers.py:1228
 
msgid "chmod"
 
msgstr "chmod"
 

	
 
#: kallithea/lib/helpers.py:1460
 
#, python-format
 
msgid ""
 
"%s repository is not mapped to db perhaps it was created or renamed from the "
 
"filesystem please run the application again in order to rescan repositories"
 
msgstr ""
 
"Рэпазітар %s адсутнічае ў базе дадзеных; магчыма, ён быў створаны ці "
 
"пераназваны з файлавай сістэмы. Калі ласка, перазапусціце прыкладанне для "
 
"сканавання рэпазітароў"
 

	
 
#: kallithea/lib/utils2.py:425
 
#, python-format
 
msgid "%d year"
 
msgid_plural "%d years"
 
msgstr[0] "%d год"
 
msgstr[1] "%d гадоў"
 
msgstr[2] "%d гады"
 

	
 
#: kallithea/lib/utils2.py:426
 
#, python-format
 
msgid "%d month"
 
msgid_plural "%d months"
 
msgstr[0] "%d месяц"
 
msgstr[1] "%d месяца"
 
msgstr[2] "%d месяцаў"
 

	
 
#: kallithea/lib/utils2.py:427
 
#, python-format
 
msgid "%d day"
 
msgid_plural "%d days"
 
msgstr[0] "%d дзень"
 
msgstr[1] "%d дня"
 
msgstr[2] "%d дзён"
 

	
 
#: kallithea/lib/utils2.py:428
 
#, python-format
 
msgid "%d hour"
 
msgid_plural "%d hours"
 
msgstr[0] "%d гадзіна"
 
msgstr[1] "%d гадзін"
 
msgstr[2] "%d гадзіны"
 

	
 
#: kallithea/lib/utils2.py:429
 
#, python-format
 
msgid "%d minute"
 
msgid_plural "%d minutes"
 
msgstr[0] "%d хвіліна"
 
msgstr[1] "%d хвіліны"
 
msgstr[2] "%d хвілін"
 

	
 
#: kallithea/lib/utils2.py:430
 
#, python-format
 
msgid "%d second"
 
msgid_plural "%d seconds"
 
msgstr[0] "%d секунды"
 
msgstr[1] "%d секунды"
 
msgstr[2] "%d секунды"
 

	
 
#: kallithea/lib/utils2.py:446
 
#, python-format
 
msgid "in %s"
 
msgstr "у %s"
 

	
 
#: kallithea/lib/utils2.py:448
 
#, python-format
 
msgid "%s ago"
 
msgstr "%s назад"
 

	
 
#: kallithea/lib/utils2.py:450
 
#, python-format
 
msgid "in %s and %s"
 
msgstr "у %s і %s"
 

	
 
#: kallithea/lib/utils2.py:453
 
#, python-format
 
msgid "%s and %s ago"
 
msgstr "%s і %s назад"
 

	
 
#: kallithea/lib/utils2.py:456
 
msgid "just now"
 
msgstr "прама цяпер"
 

	
 
#: kallithea/lib/dbmigrate/schema/db_1_4_0.py:1163
 
#: kallithea/lib/dbmigrate/schema/db_1_5_0.py:1182
 
#: kallithea/lib/dbmigrate/schema/db_1_5_2.py:1303
 
#: kallithea/lib/dbmigrate/schema/db_1_6_0.py:1388
 
#: kallithea/lib/dbmigrate/schema/db_1_7_0.py:1408
 
#: kallithea/lib/dbmigrate/schema/db_1_8_0.py:1454
 
#: kallithea/lib/dbmigrate/schema/db_2_0_0.py:1511
 
#: kallithea/lib/dbmigrate/schema/db_2_0_1.py:1512
 
#: kallithea/lib/dbmigrate/schema/db_2_0_2.py:1533
 
#: kallithea/lib/dbmigrate/schema/db_2_1_0.py:1572
 
#: kallithea/lib/dbmigrate/schema/db_2_2_0.py:1622
 
#: kallithea/lib/dbmigrate/schema/db_2_2_3.py:1649 kallithea/model/db.py:1651
 
msgid "Repository no access"
 
msgstr "Рэпазітар - няма доступу"
 

	
 
#: kallithea/lib/dbmigrate/schema/db_1_4_0.py:1164
 
#: kallithea/lib/dbmigrate/schema/db_1_5_0.py:1183
 
#: kallithea/lib/dbmigrate/schema/db_1_5_2.py:1304
 
#: kallithea/lib/dbmigrate/schema/db_1_6_0.py:1389
 
#: kallithea/lib/dbmigrate/schema/db_1_7_0.py:1409
 
#: kallithea/lib/dbmigrate/schema/db_1_8_0.py:1455
 
#: kallithea/lib/dbmigrate/schema/db_2_0_0.py:1512
 
#: kallithea/lib/dbmigrate/schema/db_2_0_1.py:1513
 
#: kallithea/lib/dbmigrate/schema/db_2_0_2.py:1534
 
#: kallithea/lib/dbmigrate/schema/db_2_1_0.py:1573
 
#: kallithea/lib/dbmigrate/schema/db_2_2_0.py:1623
 
#: kallithea/lib/dbmigrate/schema/db_2_2_3.py:1650 kallithea/model/db.py:1652
 
msgid "Repository read access"
 
msgstr "Рэпазітар - доступ на чытанне"
 

	
 
#: kallithea/lib/dbmigrate/schema/db_1_4_0.py:1165
 
#: kallithea/lib/dbmigrate/schema/db_1_5_0.py:1184
 
#: kallithea/lib/dbmigrate/schema/db_1_5_2.py:1305
 
#: kallithea/lib/dbmigrate/schema/db_1_6_0.py:1390
 
#: kallithea/lib/dbmigrate/schema/db_1_7_0.py:1410
 
#: kallithea/lib/dbmigrate/schema/db_1_8_0.py:1456
 
#: kallithea/lib/dbmigrate/schema/db_2_0_0.py:1513
 
#: kallithea/lib/dbmigrate/schema/db_2_0_1.py:1514
 
#: kallithea/lib/dbmigrate/schema/db_2_0_2.py:1535
 
#: kallithea/lib/dbmigrate/schema/db_2_1_0.py:1574
 
#: kallithea/lib/dbmigrate/schema/db_2_2_0.py:1624
 
#: kallithea/lib/dbmigrate/schema/db_2_2_3.py:1651 kallithea/model/db.py:1653
 
msgid "Repository write access"
 
msgstr "Рэпазітар - доступ на запіс"
 

	
 
#: kallithea/lib/dbmigrate/schema/db_1_4_0.py:1166
 
#: kallithea/lib/dbmigrate/schema/db_1_5_0.py:1185
 
#: kallithea/lib/dbmigrate/schema/db_1_5_2.py:1306
 
#: kallithea/lib/dbmigrate/schema/db_1_6_0.py:1391
 
#: kallithea/lib/dbmigrate/schema/db_1_7_0.py:1411
 
#: kallithea/lib/dbmigrate/schema/db_1_8_0.py:1457
 
#: kallithea/lib/dbmigrate/schema/db_2_0_0.py:1514
 
#: kallithea/lib/dbmigrate/schema/db_2_0_1.py:1515
 
#: kallithea/lib/dbmigrate/schema/db_2_0_2.py:1536
 
#: kallithea/lib/dbmigrate/schema/db_2_1_0.py:1575
 
#: kallithea/lib/dbmigrate/schema/db_2_2_0.py:1625
 
#: kallithea/lib/dbmigrate/schema/db_2_2_3.py:1652 kallithea/model/db.py:1654
 
msgid "Repository admin access"
 
msgstr "Рэпазітар - адміністраванне"
 

	
 
#: kallithea/lib/dbmigrate/schema/db_1_4_0.py:1168
 
#: kallithea/lib/dbmigrate/schema/db_1_5_0.py:1187
 
#: kallithea/lib/dbmigrate/schema/db_1_5_2.py:1308
 
msgid "Repository Group no access"
 
msgstr "Група Рэпазітароў - няма доступу"
 

	
 
#: kallithea/lib/dbmigrate/schema/db_1_4_0.py:1169
 
#: kallithea/lib/dbmigrate/schema/db_1_5_0.py:1188
 
#: kallithea/lib/dbmigrate/schema/db_1_5_2.py:1309
 
msgid "Repository Group read access"
 
msgstr "Група Рэпазітароў - доступ на чытанне"
 

	
 
#: kallithea/lib/dbmigrate/schema/db_1_4_0.py:1170
 
#: kallithea/lib/dbmigrate/schema/db_1_5_0.py:1189
 
#: kallithea/lib/dbmigrate/schema/db_1_5_2.py:1310
 
msgid "Repository Group write access"
 
msgstr "Група Рэпазітароў - доступ на запіс"
 

	
 
#: kallithea/lib/dbmigrate/schema/db_1_4_0.py:1171
 
#: kallithea/lib/dbmigrate/schema/db_1_5_0.py:1190
 
#: kallithea/lib/dbmigrate/schema/db_1_5_2.py:1311
 
msgid "Repository Group admin access"
 
msgstr "Група Рэпазітароў - адміністраванне"
 

	
 
#: kallithea/lib/dbmigrate/schema/db_1_4_0.py:1173
 
#: kallithea/lib/dbmigrate/schema/db_1_5_0.py:1192
 
#: kallithea/lib/dbmigrate/schema/db_1_5_2.py:1313
 
#: kallithea/lib/dbmigrate/schema/db_1_6_0.py:1398
 
#: kallithea/lib/dbmigrate/schema/db_1_7_0.py:1406
 
#: kallithea/lib/dbmigrate/schema/db_1_8_0.py:1452
 
#: kallithea/lib/dbmigrate/schema/db_2_0_0.py:1509
 
#: kallithea/lib/dbmigrate/schema/db_2_0_1.py:1510
 
#: kallithea/lib/dbmigrate/schema/db_2_0_2.py:1531
 
#: kallithea/lib/dbmigrate/schema/db_2_1_0.py:1570
 
#: kallithea/lib/dbmigrate/schema/db_2_2_0.py:1620
 
#: kallithea/lib/dbmigrate/schema/db_2_2_3.py:1647 kallithea/model/db.py:1649
 
msgid "Kallithea Administrator"
 
msgstr "Адміністратар Kallithea"
 

	
 
#: kallithea/lib/dbmigrate/schema/db_1_4_0.py:1174
 
#: kallithea/lib/dbmigrate/schema/db_1_5_0.py:1193
 
#: kallithea/lib/dbmigrate/schema/db_1_5_2.py:1314
 
#: kallithea/lib/dbmigrate/schema/db_1_6_0.py:1399
 
#: kallithea/lib/dbmigrate/schema/db_1_7_0.py:1429
 
#: kallithea/lib/dbmigrate/schema/db_1_8_0.py:1475
 
#: kallithea/lib/dbmigrate/schema/db_2_0_0.py:1532
 
#: kallithea/lib/dbmigrate/schema/db_2_0_1.py:1533
 
#: kallithea/lib/dbmigrate/schema/db_2_0_2.py:1554
 
#: kallithea/lib/dbmigrate/schema/db_2_1_0.py:1593
 
#: kallithea/lib/dbmigrate/schema/db_2_2_0.py:1643
 
#: kallithea/lib/dbmigrate/schema/db_2_2_3.py:1670 kallithea/model/db.py:1672
 
msgid "Repository creation disabled"
 
@@ -1660,769 +1660,769 @@ msgstr "Стварэнне груп рэпазітароў уключана"
 
#: kallithea/lib/dbmigrate/schema/db_2_0_1.py:1530
 
#: kallithea/lib/dbmigrate/schema/db_2_0_2.py:1551
 
#: kallithea/lib/dbmigrate/schema/db_2_1_0.py:1590
 
#: kallithea/lib/dbmigrate/schema/db_2_2_0.py:1640
 
#: kallithea/lib/dbmigrate/schema/db_2_2_3.py:1667 kallithea/model/db.py:1669
 
msgid "User Group creation disabled"
 
msgstr "Стварэнне груп карыстачоў адключана"
 

	
 
#: kallithea/lib/dbmigrate/schema/db_1_7_0.py:1427
 
#: kallithea/lib/dbmigrate/schema/db_1_8_0.py:1473
 
#: kallithea/lib/dbmigrate/schema/db_2_0_0.py:1530
 
#: kallithea/lib/dbmigrate/schema/db_2_0_1.py:1531
 
#: kallithea/lib/dbmigrate/schema/db_2_0_2.py:1552
 
#: kallithea/lib/dbmigrate/schema/db_2_1_0.py:1591
 
#: kallithea/lib/dbmigrate/schema/db_2_2_0.py:1641
 
#: kallithea/lib/dbmigrate/schema/db_2_2_3.py:1668 kallithea/model/db.py:1670
 
msgid "User Group creation enabled"
 
msgstr "Стварэнне груп карыстачоў уключана"
 

	
 
#: kallithea/lib/dbmigrate/schema/db_1_7_0.py:1435
 
#: kallithea/lib/dbmigrate/schema/db_1_8_0.py:1481
 
#: kallithea/lib/dbmigrate/schema/db_2_0_0.py:1538
 
#: kallithea/lib/dbmigrate/schema/db_2_0_1.py:1539
 
#: kallithea/lib/dbmigrate/schema/db_2_0_2.py:1560
 
#: kallithea/lib/dbmigrate/schema/db_2_1_0.py:1599
 
#: kallithea/lib/dbmigrate/schema/db_2_2_0.py:1651
 
#: kallithea/lib/dbmigrate/schema/db_2_2_3.py:1678 kallithea/model/db.py:1680
 
msgid "Registration disabled"
 
msgstr "Рэгістрацыя адключана"
 

	
 
#: kallithea/lib/dbmigrate/schema/db_1_7_0.py:1436
 
#: kallithea/lib/dbmigrate/schema/db_1_8_0.py:1482
 
#: kallithea/lib/dbmigrate/schema/db_2_0_0.py:1539
 
#: kallithea/lib/dbmigrate/schema/db_2_0_1.py:1540
 
#: kallithea/lib/dbmigrate/schema/db_2_0_2.py:1561
 
#: kallithea/lib/dbmigrate/schema/db_2_1_0.py:1600
 
#: kallithea/lib/dbmigrate/schema/db_2_2_0.py:1652
 
#: kallithea/lib/dbmigrate/schema/db_2_2_3.py:1679 kallithea/model/db.py:1681
 
msgid "User Registration with manual account activation"
 
msgstr "Рэгістрацыя карыстача з ручной актывацыяй уліковага запісу"
 

	
 
#: kallithea/lib/dbmigrate/schema/db_1_7_0.py:1437
 
#: kallithea/lib/dbmigrate/schema/db_1_8_0.py:1483
 
#: kallithea/lib/dbmigrate/schema/db_2_0_0.py:1540
 
#: kallithea/lib/dbmigrate/schema/db_2_0_1.py:1541
 
#: kallithea/lib/dbmigrate/schema/db_2_0_2.py:1562
 
#: kallithea/lib/dbmigrate/schema/db_2_1_0.py:1601
 
#: kallithea/lib/dbmigrate/schema/db_2_2_0.py:1653
 
#: kallithea/lib/dbmigrate/schema/db_2_2_3.py:1680 kallithea/model/db.py:1682
 
msgid "User Registration with automatic account activation"
 
msgstr "Рэгістрацыя карыстача з аўтаматычнай актывацыяй"
 

	
 
#: kallithea/lib/dbmigrate/schema/db_2_2_0.py:1645
 
#: kallithea/lib/dbmigrate/schema/db_2_2_3.py:1672 kallithea/model/db.py:1674
 
msgid "Repository creation enabled with write permission to a repository group"
 
msgstr ""
 

	
 
#: kallithea/lib/dbmigrate/schema/db_2_2_0.py:1646
 
#: kallithea/lib/dbmigrate/schema/db_2_2_3.py:1673 kallithea/model/db.py:1675
 
msgid ""
 
"Repository creation disabled with write permission to a repository group"
 
msgstr ""
 

	
 
#: kallithea/model/comment.py:76
 
#, python-format
 
msgid "on line %s"
 
msgstr "на радку %s"
 

	
 
#: kallithea/model/comment.py:231 kallithea/model/pull_request.py:164
 
msgid "[Mention]"
 
msgstr "[Згадванне]"
 

	
 
#: kallithea/model/forms.py:57
 
msgid "Please enter a login"
 
msgstr "Калі ласка, увядзіце лагін"
 

	
 
#: kallithea/model/forms.py:58
 
#, python-format
 
msgid "Enter a value %(min)i characters long or more"
 
msgstr "Увядзіце значэнне даўжынёй не меней %(min)i знакаў"
 

	
 
#: kallithea/model/forms.py:66
 
msgid "Please enter a password"
 
msgstr "Калі ласка, увядзіце пароль"
 

	
 
#: kallithea/model/forms.py:67
 
#, python-format
 
msgid "Enter %(min)i characters or more"
 
msgstr "Увядзіце не меней %(min)i знакаў"
 

	
 
#: kallithea/model/forms.py:156
 
msgid "Name must not contain only digits"
 
msgstr ""
 

	
 
#: kallithea/model/notification.py:252
 
#, python-format
 
msgid "%(user)s commented on changeset at %(when)s"
 
msgstr "%(user)s пакінуў каментар да набору змен %(when)s"
 

	
 
#: kallithea/model/notification.py:253
 
#, python-format
 
msgid "%(user)s sent message at %(when)s"
 
msgstr "%(user)s адправіў паведамленне %(when)s"
 

	
 
#: kallithea/model/notification.py:254
 
#, python-format
 
msgid "%(user)s mentioned you at %(when)s"
 
msgstr "%(user)s згадаў вас %(when)s"
 

	
 
#: kallithea/model/notification.py:255
 
#, python-format
 
msgid "%(user)s registered in Kallithea at %(when)s"
 
msgstr "%(user)s зарэгістраваўся ў Kallithea %(when)s"
 

	
 
#: kallithea/model/notification.py:256
 
#, python-format
 
msgid "%(user)s opened new pull request at %(when)s"
 
msgstr "%(user)s адкрыў новы pull-запыт %(when)s"
 

	
 
#: kallithea/model/notification.py:257
 
#, python-format
 
msgid "%(user)s commented on pull request at %(when)s"
 
msgstr "%(user)s пакінуў каментар да pull-запыту %(when)s"
 

	
 
#: kallithea/model/notification.py:296
 
#, python-format
 
msgid ""
 
"Comment on %(repo_name)s changeset %(short_id)s on %(branch)s by "
 
"%(comment_username)s"
 
msgstr ""
 

	
 
#: kallithea/model/notification.py:299
 
#, python-format
 
msgid "New user %(new_username)s registered"
 
msgstr "Новы карыстач \"%(new_username)s\" зарэгістраваны"
 

	
 
#: kallithea/model/notification.py:301
 
#, python-format
 
msgid ""
 
"Review request on %(repo_name)s pull request #%(pr_id)s from %(ref)s by "
 
"%(pr_username)s"
 
msgstr ""
 

	
 
#: kallithea/model/notification.py:302
 
#, python-format
 
msgid ""
 
"Comment on %(repo_name)s pull request #%(pr_id)s from %(ref)s by "
 
"%(comment_username)s"
 
msgstr ""
 

	
 
#: kallithea/model/notification.py:315
 
msgid "Closing"
 
msgstr "Зачынены"
 

	
 
#: kallithea/model/pull_request.py:132
 
#, python-format
 
msgid "%(user)s wants you to review pull request #%(pr_id)s: %(pr_title)s"
 
msgstr "%(user)s просіць вас разгледзець pull request #%(pr_id)s: %(pr_title)s"
 

	
 
#: kallithea/model/scm.py:808
 
msgid "latest tip"
 
msgstr "апошняя версія"
 

	
 
#: kallithea/model/user.py:194
 
msgid "New user registration"
 
msgstr "Рэгістрацыя новага карыстача"
 

	
 
#: kallithea/model/user.py:214 kallithea/model/user.py:236
 
msgid "You can't Edit this user since it's crucial for entire application"
 
msgstr ""
 
"Вы не можаце рэдагаваць карыстача, паколькі гэта крытычна для працы ўсяго "
 
"прыкладання"
 

	
 
#: kallithea/model/user.py:255
 
msgid "You can't remove this user since it's crucial for entire application"
 
msgstr ""
 
"Вы не можаце выдаліць карыстача, паколькі гэта крытычна для працы ўсяго "
 
"прыкладання"
 

	
 
#: kallithea/model/user.py:261
 
#, python-format
 
msgid ""
 
"User \"%s\" still owns %s repositories and cannot be removed. Switch owners "
 
"or remove those repositories: %s"
 
msgstr ""
 
"Карыстач \"%s\" усё яшчэ з'яўляецца ўладальнікам %s рэпазітароў і таму не "
 
"можа быць выдалены. Зменіце ўладальніка ці выдаліце гэтыя рэпазітары: %s"
 

	
 
#: kallithea/model/user.py:268
 
#, python-format
 
msgid ""
 
"User \"%s\" still owns %s repository groups and cannot be removed. Switch "
 
"owners or remove those repository groups: %s"
 
msgstr ""
 
"Карыстач \"%s\" усё яшчэ з'яўляецца ўладальнікам %s груп рэпазітароў і таму "
 
"не можа быць выдалены. Зменіце ўладальніка ці выдаліце дадзеныя групы: %s"
 

	
 
#: kallithea/model/user.py:275
 
#, python-format
 
msgid ""
 
"User \"%s\" still owns %s user groups and cannot be removed. Switch owners "
 
"or remove those user groups: %s"
 
msgstr ""
 
"Карыстач \"%s\" усё яшчэ з'яўляецца ўладальнікам %s груп карыстачоў і таму "
 
"не можа быць выдалены. Зменіце ўладальніка ці выдаліце дадзеныя групы: %s"
 

	
 
#: kallithea/model/user.py:305
 
msgid "Password reset link"
 
msgstr "Спасылка скіду пароля"
 

	
 
#: kallithea/model/user.py:328
 
msgid "Your new password"
 
msgstr "Ваш новы пароль"
 

	
 
#: kallithea/model/user.py:329
 
#, python-format
 
msgid "Your new Kallithea password:%s"
 
msgstr "Ваш новы пароль ад Kallithea: %s"
 

	
 
#: kallithea/model/validators.py:83 kallithea/model/validators.py:84
 
msgid "Value cannot be an empty list"
 
msgstr "Значэнне не можа быць пустым спісам"
 

	
 
#: kallithea/model/validators.py:101
 
#, python-format
 
msgid "Username \"%(username)s\" already exists"
 
msgstr "Карыстач з імем \"%(username)s\" ужо існуе"
 

	
 
#: kallithea/model/validators.py:103
 
#, python-format
 
msgid "Username \"%(username)s\" is forbidden"
 
msgstr "Імя \"%(username)s\" адхілена"
 

	
 
#: kallithea/model/validators.py:105
 
msgid ""
 
"Username may only contain alphanumeric characters underscores, periods or "
 
"dashes and must begin with alphanumeric character or underscore"
 
msgstr ""
 
"Імя карыстача можа ўтрымоўваць толькі літары, лічбы, знакі падкрэслення, "
 
"кропкі і працяжнік; а гэтак жа павінна пачынацца з літары, лічбы або са "
 
"знака падкрэслення"
 

	
 
#: kallithea/model/validators.py:132
 
msgid "The input is not valid"
 
msgstr ""
 

	
 
#: kallithea/model/validators.py:139
 
#, python-format
 
msgid "Username %(username)s is not valid"
 
msgstr "Імя \"%(username)s\" недапушчальна"
 

	
 
#: kallithea/model/validators.py:158
 
msgid "Invalid user group name"
 
msgstr "Няслушнае імя групы карыстачоў"
 

	
 
#: kallithea/model/validators.py:159
 
#, python-format
 
msgid "User group \"%(usergroup)s\" already exists"
 
msgstr "Група карыстачоў \"%(usergroup)s\" ужо існуе"
 

	
 
#: kallithea/model/validators.py:161
 
msgid ""
 
"user group name may only contain alphanumeric characters underscores, "
 
"periods or dashes and must begin with alphanumeric character"
 
msgstr ""
 
"імя групы карыстачоў можа ўтрымоўваць толькі літары, лічбы, знакі "
 
"падкрэслення, кропкі і працяжнік; а гэтак жа павінна пачынацца з літары ці "
 
"лічбы"
 

	
 
#: kallithea/model/validators.py:199
 
msgid "Cannot assign this group as parent"
 
msgstr "Немагчыма выкарыстоўваць гэту групу як бацькоўскую"
 

	
 
#: kallithea/model/validators.py:200
 
#, python-format
 
msgid "Group \"%(group_name)s\" already exists"
 
msgstr "Група \"%(group_name)s\" ужо існуе"
 

	
 
#: kallithea/model/validators.py:202
 
#, python-format
 
msgid "Repository with name \"%(group_name)s\" already exists"
 
msgstr "Рэпазітар з  імем \"%(group_name)s\" ужо існуе"
 

	
 
#: kallithea/model/validators.py:260
 
msgid "Invalid characters (non-ascii) in password"
 
msgstr "Недапушчальныя знакі (не ascii) у паролі"
 

	
 
#: kallithea/model/validators.py:275
 
msgid "Invalid old password"
 
msgstr "Няслушна зададзены стары пароль"
 

	
 
#: kallithea/model/validators.py:291
 
msgid "Passwords do not match"
 
msgstr "Паролі не супадаюць"
 

	
 
#: kallithea/model/validators.py:308
 
msgid "invalid password"
 
msgstr "няслушны пароль"
 

	
 
#: kallithea/model/validators.py:309
 
msgid "invalid user name"
 
msgstr "няслушнае імя карыстача"
 

	
 
#: kallithea/model/validators.py:310
 
msgid "Your account is disabled"
 
msgstr "Ваш акаўнт выключаны"
 

	
 
#: kallithea/model/validators.py:354
 
#, python-format
 
msgid "Repository name %(repo)s is disallowed"
 
msgstr "Імя рэпазітара %(repo)s забаронена"
 

	
 
#: kallithea/model/validators.py:356
 
#, python-format
 
msgid "Repository named %(repo)s already exists"
 
msgstr "Рэпазітар %(repo)s ужо існуе"
 

	
 
#: kallithea/model/validators.py:357
 
#, python-format
 
msgid "Repository \"%(repo)s\" already exists in group \"%(group)s\""
 
msgstr "Рэпазітар \"%(repo)s\" ужо існуе ў групе \"%(group)s\""
 

	
 
#: kallithea/model/validators.py:359
 
#, python-format
 
msgid "Repository group with name \"%(repo)s\" already exists"
 
msgstr "Група рэпазітароў \"%(repo)s\" ужо існуе"
 

	
 
#: kallithea/model/validators.py:474
 
msgid "invalid clone URL"
 
msgstr "няслушны URL для кланавання"
 

	
 
#: kallithea/model/validators.py:475
 
msgid "Invalid clone URL, provide a valid clone http(s)/svn+http(s)/ssh URL"
 
msgstr ""
 
"Няслушны URL кланаванні, падайце карэктны URL для кланавання ў фармаце "
 
"http(s)/svn+http(s)/ssh"
 

	
 
#: kallithea/model/validators.py:500
 
msgid "Fork has to be the same type as parent"
 
msgstr "Тып форка будзе супадаць з бацькоўскім"
 

	
 
#: kallithea/model/validators.py:515
 
msgid "You don't have permissions to create repository in this group"
 
msgstr "У вас недастаткова мае рацыю для стварэння рэпазітароў у гэтай групе"
 

	
 
#: kallithea/model/validators.py:517
 
msgid "no permission to create repository in root location"
 
msgstr "недастаткова мае рацыю для стварэння рэпазітара ў каранёвым каталогу"
 

	
 
#: kallithea/model/validators.py:566
 
msgid "You don't have permissions to create a group in this location"
 
msgstr "У Вас недастаткова прывілеяў для стварэння групы ў гэтым месцы"
 

	
 
#: kallithea/model/validators.py:607
 
msgid "This username or user group name is not valid"
 
msgstr "Дадзенае імя карыстача ці групы карыстачоў недапушчальна"
 

	
 
#: kallithea/model/validators.py:700
 
msgid "This is not a valid path"
 
msgstr "Гэты шлях хібны"
 

	
 
#: kallithea/model/validators.py:715
 
msgid "This e-mail address is already taken"
 
msgstr "Гэты E-mail ужо заняты"
 

	
 
#: kallithea/model/validators.py:735
 
#, python-format
 
msgid "e-mail \"%(email)s\" does not exist."
 
msgstr "\"%(email)s\" не існуе."
 

	
 
#: kallithea/model/validators.py:772
 
msgid ""
 
"The LDAP Login attribute of the CN must be specified - this is the name of "
 
"the attribute that is equivalent to \"username\""
 
msgstr ""
 
"Для ўваходу па LDAP павінна быць паказана значэнне атрыбута CN - гэта "
 
"эквівалент імя карыстача"
 

	
 
#: kallithea/model/validators.py:785
 
#, python-format
 
msgid "Revisions %(revs)s are already part of pull request or have set status"
 
msgstr "Рэвізіі %(revs)s ужо ўключаны ў pull-request ці маюць усталяваны статус"
 

	
 
#: kallithea/model/validators.py:817
 
msgid "Please enter a valid IPv4 or IPv6 address"
 
msgid "Please enter a valid IPv4 or IpV6 address"
 
msgstr "Калі ласка, увядзіце існы IPv4 ці IPv6 адрас"
 

	
 
#: kallithea/model/validators.py:818
 
#, python-format
 
msgid "The network size (bits) must be within the range of 0-32 (not %(bits)r)"
 
msgstr ""
 
"Значэнне маскі падсеткі павінна быць у межах ад 0 да 32 (%(bits)r - няслушна)"
 

	
 
#: kallithea/model/validators.py:851
 
msgid "Key name can only consist of letters, underscore, dash or numbers"
 
msgstr ""
 
"Ключавое імя можа толькі складацца з літар, знака падкрэслення, працяжнік ці "
 
"лікаў"
 

	
 
#: kallithea/model/validators.py:865
 
msgid "Filename cannot be inside a directory"
 
msgstr "Файла няма ў каталогу"
 

	
 
#: kallithea/model/validators.py:881
 
#, python-format
 
msgid "Plugins %(loaded)s and %(next_to_load)s both export the same name"
 
msgstr ""
 

	
 
#: kallithea/templates/about.html:4 kallithea/templates/about.html:17
 
msgid "About"
 
msgstr "Пра праграму"
 

	
 
#: kallithea/templates/index.html:5
 
msgid "Dashboard"
 
msgstr "Панэль кіравання"
 

	
 
#: kallithea/templates/index_base.html:6
 
#: kallithea/templates/admin/my_account/my_account_repos.html:3
 
#: kallithea/templates/admin/my_account/my_account_watched.html:3
 
#: kallithea/templates/admin/repo_groups/repo_groups.html:9
 
#: kallithea/templates/admin/repos/repos.html:9
 
#: kallithea/templates/admin/user_groups/user_groups.html:9
 
#: kallithea/templates/admin/users/users.html:9
 
#: kallithea/templates/bookmarks/bookmarks.html:9
 
#: kallithea/templates/branches/branches.html:9
 
#: kallithea/templates/journal/journal.html:9
 
#: kallithea/templates/journal/journal.html:48
 
#: kallithea/templates/journal/journal.html:49
 
#: kallithea/templates/tags/tags.html:9
 
msgid "quick filter..."
 
msgstr "фільтр..."
 

	
 
#: kallithea/templates/index_base.html:6
 
msgid "repositories"
 
msgstr "рэпазітары"
 

	
 
#: kallithea/templates/index_base.html:20
 
#: kallithea/templates/index_base.html:25
 
#: kallithea/templates/admin/repos/repo_add.html:5
 
#: kallithea/templates/admin/repos/repo_add.html:19
 
#: kallithea/templates/admin/repos/repos.html:22
 
msgid "Add Repository"
 
msgstr "Дадаць рэпазітар"
 

	
 
#: kallithea/templates/index_base.html:22
 
#: kallithea/templates/index_base.html:27
 
#: kallithea/templates/admin/repo_groups/repo_group_add.html:5
 
#: kallithea/templates/admin/repo_groups/repo_group_add.html:13
 
#: kallithea/templates/admin/repo_groups/repo_groups.html:26
 
msgid "Add Repository Group"
 
msgstr "Дадаць групу рэпазітароў"
 

	
 
#: kallithea/templates/index_base.html:32
 
msgid "You have admin right to this group, and can edit it"
 
msgstr "Вы маеце адміністратарскія правы на гэту групу і можаце рэдагаваць яе"
 

	
 
#: kallithea/templates/index_base.html:32
 
msgid "Edit Repository Group"
 
msgstr "Змяніць групу рэпазітароў"
 

	
 
#: kallithea/templates/index_base.html:45
 
msgid "Group Name"
 
msgstr "Імя групы"
 

	
 
#: kallithea/templates/index_base.html:46
 
#: kallithea/templates/index_base.html:131
 
#: kallithea/templates/admin/my_account/my_account_api_keys.html:64
 
#: kallithea/templates/admin/repo_groups/repo_group_add.html:42
 
#: kallithea/templates/admin/repo_groups/repo_group_edit_settings.html:17
 
#: kallithea/templates/admin/repo_groups/repo_groups.html:47
 
#: kallithea/templates/admin/repos/repo_add_base.html:32
 
#: kallithea/templates/admin/repos/repo_edit_settings.html:72
 
#: kallithea/templates/admin/repos/repos.html:48
 
#: kallithea/templates/admin/user_groups/user_group_add.html:40
 
#: kallithea/templates/admin/user_groups/user_group_edit_settings.html:15
 
#: kallithea/templates/admin/user_groups/user_groups.html:47
 
#: kallithea/templates/admin/users/user_edit_api_keys.html:64
 
#: kallithea/templates/email_templates/changeset_comment.html:18
 
#: kallithea/templates/email_templates/pull_request.html:12
 
#: kallithea/templates/forks/fork.html:38
 
#: kallithea/templates/pullrequests/pullrequest.html:40
 
#: kallithea/templates/pullrequests/pullrequest_show.html:38
 
#: kallithea/templates/pullrequests/pullrequest_show.html:63
 
#: kallithea/templates/summary/summary.html:84
 
msgid "Description"
 
msgstr "Апісанне"
 

	
 
#: kallithea/templates/index_base.html:129
 
#: kallithea/templates/admin/my_account/my_account_repos.html:46
 
#: kallithea/templates/admin/my_account/my_account_watched.html:46
 
#: kallithea/templates/admin/repo_groups/repo_groups.html:46
 
#: kallithea/templates/admin/repos/repo_add_base.html:9
 
#: kallithea/templates/admin/repos/repo_edit_settings.html:7
 
#: kallithea/templates/admin/repos/repos.html:47
 
#: kallithea/templates/admin/user_groups/user_groups.html:46
 
#: kallithea/templates/base/perms_summary.html:53
 
#: kallithea/templates/bookmarks/bookmarks.html:49
 
#: kallithea/templates/bookmarks/bookmarks_data.html:7
 
#: kallithea/templates/branches/branches.html:49
 
#: kallithea/templates/branches/branches_data.html:7
 
#: kallithea/templates/files/files_browser.html:60
 
#: kallithea/templates/journal/journal.html:187
 
#: kallithea/templates/journal/journal.html:278
 
#: kallithea/templates/tags/tags.html:49
 
#: kallithea/templates/tags/tags_data.html:7
 
msgid "Name"
 
msgstr "Імя"
 

	
 
#: kallithea/templates/index_base.html:132
 
msgid "Last Change"
 
msgstr "Апошняя змена"
 

	
 
#: kallithea/templates/index_base.html:134
 
#: kallithea/templates/admin/my_account/my_account_repos.html:48
 
#: kallithea/templates/admin/my_account/my_account_watched.html:48
 
#: kallithea/templates/admin/repos/repos.html:49
 
#: kallithea/templates/journal/journal.html:189
 
#: kallithea/templates/journal/journal.html:280
 
msgid "Tip"
 
msgstr "Стан"
 

	
 
#: kallithea/templates/index_base.html:136
 
#: kallithea/templates/admin/repo_groups/repo_group_edit_advanced.html:10
 
#: kallithea/templates/admin/repo_groups/repo_groups.html:49
 
#: kallithea/templates/admin/repos/repo_edit_settings.html:60
 
#: kallithea/templates/admin/repos/repos.html:50
 
#: kallithea/templates/admin/user_groups/user_group_edit_advanced.html:8
 
#: kallithea/templates/admin/user_groups/user_groups.html:50
 
#: kallithea/templates/summary/summary.html:137
 
msgid "Owner"
 
msgstr "Уладальнік"
 

	
 
#: kallithea/templates/index_base.html:144
 
#: kallithea/templates/admin/my_account/my_account_repos.html:57
 
#: kallithea/templates/admin/my_account/my_account_watched.html:57
 
#: kallithea/templates/base/root.html:44
 
#: kallithea/templates/bookmarks/bookmarks.html:79
 
#: kallithea/templates/branches/branches.html:79
 
#: kallithea/templates/journal/journal.html:198
 
#: kallithea/templates/journal/journal.html:289
 
#: kallithea/templates/tags/tags.html:79
 
msgid "Click to sort ascending"
 
msgstr "Па ўзрастанні"
 

	
 
#: kallithea/templates/index_base.html:145
 
#: kallithea/templates/admin/my_account/my_account_repos.html:58
 
#: kallithea/templates/admin/my_account/my_account_watched.html:58
 
#: kallithea/templates/base/root.html:45
 
#: kallithea/templates/bookmarks/bookmarks.html:80
 
#: kallithea/templates/branches/branches.html:80
 
#: kallithea/templates/journal/journal.html:199
 
#: kallithea/templates/journal/journal.html:290
 
#: kallithea/templates/tags/tags.html:80
 
msgid "Click to sort descending"
 
msgstr "Па змяншэнні"
 

	
 
#: kallithea/templates/index_base.html:146
 
msgid "No repositories found."
 
msgstr "Рэпазітары не знойдзены."
 

	
 
#: kallithea/templates/index_base.html:147
 
#: kallithea/templates/admin/my_account/my_account_repos.html:60
 
#: kallithea/templates/admin/my_account/my_account_watched.html:60
 
#: kallithea/templates/base/root.html:47
 
#: kallithea/templates/bookmarks/bookmarks.html:82
 
#: kallithea/templates/branches/branches.html:82
 
#: kallithea/templates/journal/journal.html:201
 
#: kallithea/templates/journal/journal.html:292
 
#: kallithea/templates/tags/tags.html:82
 
msgid "Data error."
 
msgstr "Памылка дадзеных."
 

	
 
#: kallithea/templates/index_base.html:148
 
#: kallithea/templates/admin/my_account/my_account_repos.html:61
 
#: kallithea/templates/admin/my_account/my_account_watched.html:61
 
#: kallithea/templates/base/base.html:143
 
#: kallithea/templates/base/root.html:48
 
#: kallithea/templates/bookmarks/bookmarks.html:83
 
#: kallithea/templates/branches/branches.html:83
 
#: kallithea/templates/journal/journal.html:202
 
#: kallithea/templates/journal/journal.html:293
 
#: kallithea/templates/tags/tags.html:83
 
msgid "Loading..."
 
msgstr "Загрузка..."
 

	
 
#: kallithea/templates/login.html:5 kallithea/templates/login.html:15
 
#: kallithea/templates/base/base.html:329
 
msgid "Log In"
 
msgstr "Увайсці"
 

	
 
#: kallithea/templates/login.html:13
 
#, python-format
 
msgid "Log In to %s"
 
msgstr "Увайсці ў %s"
 

	
 
#: kallithea/templates/login.html:27 kallithea/templates/register.html:24
 
#: kallithea/templates/admin/admin_log.html:5
 
#: kallithea/templates/admin/my_account/my_account_profile.html:32
 
#: kallithea/templates/admin/users/user_add.html:32
 
#: kallithea/templates/admin/users/user_edit_profile.html:33
 
#: kallithea/templates/admin/users/users.html:50
 
#: kallithea/templates/base/base.html:305
 
msgid "Username"
 
msgstr "Імя карыстача"
 

	
 
#: kallithea/templates/login.html:36 kallithea/templates/register.html:33
 
#: kallithea/templates/admin/my_account/my_account.html:36
 
#: kallithea/templates/admin/users/user_add.html:41
 
#: kallithea/templates/base/base.html:314
 
msgid "Password"
 
msgstr "Пароль"
 

	
 
#: kallithea/templates/login.html:46
 
msgid "Remember me"
 
msgstr "Запомніць"
 

	
 
#: kallithea/templates/login.html:50
 
msgid "Sign In"
 
msgstr "Увайсці"
 

	
 
#: kallithea/templates/login.html:56
 
msgid "Forgot your password ?"
 
msgstr "Забыліся пароль?"
 

	
 
#: kallithea/templates/login.html:59 kallithea/templates/base/base.html:325
 
msgid "Don't have an account ?"
 
msgstr "Няма акаўнта?"
 

	
 
#: kallithea/templates/password_reset.html:5
 
msgid "Password Reset"
 
msgstr "Скід пароля"
 

	
 
#: kallithea/templates/password_reset.html:12
 
#, python-format
 
msgid "Reset Your Password to %s"
 
msgstr "Забыліся пароль для %s?"
 

	
 
#: kallithea/templates/password_reset.html:14
 
msgid "Reset Your Password"
 
msgstr "Скінуць Ваш пароль"
 

	
 
#: kallithea/templates/password_reset.html:25
 
msgid "Email Address"
 
msgstr "Паштовы адрас"
 

	
 
#: kallithea/templates/password_reset.html:35
 
#: kallithea/templates/register.html:79
 
msgid "Captcha"
 
msgstr "Капча"
 

	
 
#: kallithea/templates/password_reset.html:46
 
msgid "Send Password Reset Email"
 
msgstr "Паслаць спасылку скіду пароля"
 

	
 
#: kallithea/templates/password_reset.html:47
 
msgid ""
 
"Password reset link will be sent to the email address matching your username."
 
msgstr "Спасылка для скіду пароля была адпраўлена на адпаведны e-mail."
 

	
 
#: kallithea/templates/register.html:5 kallithea/templates/register.html:14
 
#: kallithea/templates/register.html:90
 
msgid "Sign Up"
 
msgstr "Рэгістрацыя"
 

	
 
#: kallithea/templates/register.html:12
 
#, python-format
 
msgid "Sign Up to %s"
 
msgstr "Рэгістра на %s"
 

	
 
#: kallithea/templates/register.html:42
 
msgid "Re-enter password"
 
msgstr "Паўторыце пароль"
 

	
 
#: kallithea/templates/register.html:51
 
#: kallithea/templates/admin/my_account/my_account_profile.html:43
 
#: kallithea/templates/admin/users/user_add.html:59
 
#: kallithea/templates/admin/users/user_edit_profile.html:87
 
#: kallithea/templates/admin/users/users.html:51
 
msgid "First Name"
 
msgstr "Імя"
 

	
 
#: kallithea/templates/register.html:60
 
#: kallithea/templates/admin/my_account/my_account_profile.html:52
 
#: kallithea/templates/admin/users/user_add.html:68
 
#: kallithea/templates/admin/users/user_edit_profile.html:96
 
#: kallithea/templates/admin/users/users.html:52
 
msgid "Last Name"
 
msgstr "Прозвішча"
 

	
 
#: kallithea/templates/register.html:69
 
#: kallithea/templates/admin/my_account/my_account_profile.html:61
 
#: kallithea/templates/admin/settings/settings.html:31
 
#: kallithea/templates/admin/users/user_add.html:77
 
#: kallithea/templates/admin/users/user_edit_profile.html:42
 
msgid "Email"
 
msgstr "E-mail"
 

	
 
#: kallithea/templates/register.html:92
 
msgid "Registered accounts are ready to use and need no further action."
 
msgstr ""
 

	
 
#: kallithea/templates/register.html:94
 
msgid "Please wait for an administrator to activate your account."
 
msgstr ""
 
"Калі ласка, пачакайце, пакуль адміністратар пацвердзіць Вашу рэгістрацыю."
 

	
 
#: kallithea/templates/switch_to_list.html:10
 
#: kallithea/templates/branches/branches_data.html:69
 
msgid "There are no branches yet"
 
msgstr "Галінкі яшчэ не створаны"
 

	
 
#: kallithea/templates/switch_to_list.html:16
 
msgid "Closed Branches"
 
msgstr "Зачыненыя галінкі"
 

	
 
#: kallithea/templates/switch_to_list.html:32
 
#: kallithea/templates/tags/tags_data.html:44
 
msgid "There are no tags yet"
 
msgstr "Пазнакі адсутнічаюць"
 

	
 
#: kallithea/templates/switch_to_list.html:45
 
#: kallithea/templates/bookmarks/bookmarks_data.html:43
 
msgid "There are no bookmarks yet"
 
msgstr "Закладак яшчэ няма"
 

	
 
#: kallithea/templates/admin/admin.html:5
 
#: kallithea/templates/admin/admin.html:13
 
#: kallithea/templates/base/base.html:59
 
msgid "Admin Journal"
 
msgstr "Часопіс адміністратара"
 

	
 
#: kallithea/templates/admin/admin.html:10
 
msgid "journal filter..."
 
msgstr "Фільтр часопіса..."
 

	
 
#: kallithea/templates/admin/admin.html:12
 
#: kallithea/templates/journal/journal.html:11
 
msgid "Filter"
 
msgstr "Адфільтраваць"
 

	
 
#: kallithea/templates/admin/admin.html:13
 
#: kallithea/templates/journal/journal.html:12
 
#, python-format
 
msgid "%s Entry"
 
msgid_plural "%s Entries"
 
msgstr[0] "%s запіс"
 
msgstr[1] "%s запісаў"
 
msgstr[2] "%s запісы"
 

	
 
#: kallithea/templates/admin/admin_log.html:6
 
#: kallithea/templates/admin/my_account/my_account_repos.html:50
 
#: kallithea/templates/admin/my_account/my_account_watched.html:50
 
#: kallithea/templates/admin/repo_groups/repo_groups.html:50
 
#: kallithea/templates/admin/repos/repo_edit_fields.html:8
 
#: kallithea/templates/admin/repos/repos.html:52
 
#: kallithea/templates/admin/user_groups/user_groups.html:51
 
#: kallithea/templates/admin/users/users.html:57
 
#: kallithea/templates/journal/journal.html:191
 
#: kallithea/templates/journal/journal.html:282
 
msgid "Action"
 
msgstr "Дзеянне"
 

	
 
#: kallithea/templates/admin/admin_log.html:7
 
#: kallithea/templates/admin/permissions/permissions_globals.html:18
 
msgid "Repository"
 
msgstr "Рэпазітар"
 

	
 
#: kallithea/templates/admin/admin_log.html:8
 
#: kallithea/templates/bookmarks/bookmarks.html:51

Changeset was too big and was cut off... Show full diff anyway

0 comments (0 inline, 0 general)