diff options
author | Marcin Kuzminski <marcin@python-works.com> | 2012-02-26 17:25:09 +0200 |
---|---|---|
committer | Marcin Kuzminski <marcin@python-works.com> | 2012-02-26 17:25:09 +0200 |
commit | 5b59d2e9c033dbfec5a56f04faa10125c5db03e1 (patch) | |
tree | 8ea23e3584611ee0b0bcbd0024dd190b716e627e /docs | |
parent | 1da79c2a84c0cd8b34671b9e56acc801519fae96 (diff) | |
parent | d5ed56fae994d7e0f6391d215572ae1d906cf04b (diff) |
merge 1.3 into stable
--HG--
rename : docs/usage/enable_git.rst => docs/usage/git_support.rst
rename : rhodecode/lib/smtp_mailer.py => rhodecode/lib/rcmail/smtp_mailer.py
Diffstat (limited to 'docs')
-rw-r--r-- | docs/api/api.rst | 443 | ||||
-rw-r--r-- | docs/api/index.rst | 10 | ||||
-rw-r--r-- | docs/api/models.rst | 19 | ||||
-rw-r--r-- | docs/changelog.rst | 177 | ||||
-rw-r--r-- | docs/images/.img | 0 | ||||
-rw-r--r-- | docs/images/screenshot1_main_page.png | bin | 122402 -> 0 bytes | |||
-rw-r--r-- | docs/images/screenshot2_summary_page.png | bin | 121324 -> 0 bytes | |||
-rw-r--r-- | docs/images/screenshot3_changelog_page.png | bin | 151803 -> 0 bytes | |||
-rw-r--r-- | docs/index.rst | 12 | ||||
-rw-r--r-- | docs/screenshots.rst | 13 | ||||
-rwxr-xr-x | docs/setup.rst | 136 | ||||
-rw-r--r-- | docs/theme/nature/layout.html | 4 | ||||
-rw-r--r-- | docs/usage/api_key_access.rst | 11 | ||||
-rw-r--r-- | docs/usage/enable_git.rst | 24 | ||||
-rw-r--r-- | docs/usage/general.rst | 25 | ||||
-rw-r--r-- | docs/usage/git_support.rst | 48 |
16 files changed, 681 insertions, 241 deletions
diff --git a/docs/api/api.rst b/docs/api/api.rst index a5f2a6de..ad34884d 100644 --- a/docs/api/api.rst +++ b/docs/api/api.rst @@ -26,16 +26,18 @@ API ACCESS All clients are required to send JSON-RPC spec JSON data:: - { + { + "id:<id>, "api_key":"<api_key>", "method":"<method_name>", "args":{"<arg_key>":"<arg_val>"} } Example call for autopulling remotes repos using curl:: - curl https://server.com/_admin/api -X POST -H 'content-type:text/plain' --data-binary '{"api_key":"xe7cdb2v278e4evbdf5vs04v832v0efvcbcve4a3","method":"pull","args":{"repo":"CPython"}}' + curl https://server.com/_admin/api -X POST -H 'content-type:text/plain' --data-binary '{"id":1,"api_key":"xe7cdb2v278e4evbdf5vs04v832v0efvcbcve4a3","method":"pull","args":{"repo":"CPython"}}' Simply provide + - *id* A value of any type, which is used to match the response with the request that it is replying to. - *api_key* for access and permission validation. - *method* is name of method to call - *args* is an key:value list of arguments to pass to method @@ -47,7 +49,8 @@ Simply provide RhodeCode API will return always a JSON-RPC response:: - { + { + "id":<id>, "result": "<result>", "error": null } @@ -72,21 +75,55 @@ INPUT:: api_key : "<api_key>" method : "pull" args : { - "repo" : "<repo_name>" + "repo_name" : "<reponame>" } OUTPUT:: - result : "Pulled from <repo_name>" + result : "Pulled from <reponame>" error : null +get_user +-------- + +Get's an user by username or user_id, Returns empty result if user is not found. +This command can be executed only using api_key belonging to user with admin +rights. + + +INPUT:: + + api_key : "<api_key>" + method : "get_user" + args : { + "userid" : "<username or user_id>" + } + +OUTPUT:: + + result: None if user does not exist or + { + "id" : "<id>", + "username" : "<username>", + "firstname": "<firstname>", + "lastname" : "<lastname>", + "email" : "<email>", + "active" : "<bool>", + "admin" : "<bool>", + "ldap_dn" : "<ldap_dn>" + } + + error: null + + get_users --------- Lists all existing users. This command can be executed only using api_key belonging to user with admin rights. + INPUT:: api_key : "<api_key>" @@ -104,18 +141,20 @@ OUTPUT:: "email" : "<email>", "active" : "<bool>", "admin" : "<bool>", - "ldap" : "<ldap_dn>" + "ldap_dn" : "<ldap_dn>" }, … ] error: null + create_user ----------- -Creates new user or updates current one if such user exists. This command can +Creates new user. This command can be executed only using api_key belonging to user with admin rights. + INPUT:: api_key : "<api_key>" @@ -123,9 +162,9 @@ INPUT:: args : { "username" : "<username>", "password" : "<password>", - "firstname" : "<firstname>", - "lastname" : "<lastname>", - "email" : "<useremail>" + "email" : "<useremail>", + "firstname" : "<firstname> = None", + "lastname" : "<lastname> = None", "active" : "<bool> = True", "admin" : "<bool> = False", "ldap_dn" : "<ldap_dn> = None" @@ -134,15 +173,88 @@ INPUT:: OUTPUT:: result: { + "id" : "<new_user_id>", "msg" : "created new user <username>" } error: null + +update_user +----------- + +updates current one if such user exists. This command can +be executed only using api_key belonging to user with admin rights. + + +INPUT:: + + api_key : "<api_key>" + method : "update_user" + args : { + "userid" : "<user_id or username>", + "username" : "<username>", + "password" : "<password>", + "email" : "<useremail>", + "firstname" : "<firstname>", + "lastname" : "<lastname>", + "active" : "<bool>", + "admin" : "<bool>", + "ldap_dn" : "<ldap_dn>" + } + +OUTPUT:: + + result: { + "id" : "<edited_user_id>", + "msg" : "updated user <username>" + } + error: null + + +get_users_group +--------------- + +Gets an existing users group. This command can be executed only using api_key +belonging to user with admin rights. + + +INPUT:: + + api_key : "<api_key>" + method : "get_users_group" + args : { + "group_name" : "<name>" + } + +OUTPUT:: + + result : None if group not exist + { + "id" : "<id>", + "group_name" : "<groupname>", + "active": "<bool>", + "members" : [ + { "id" : "<userid>", + "username" : "<username>", + "firstname": "<firstname>", + "lastname" : "<lastname>", + "email" : "<email>", + "active" : "<bool>", + "admin" : "<bool>", + "ldap" : "<ldap_dn>" + }, + … + ] + } + error : null + + get_users_groups ---------------- -Lists all existing users groups. This command can be executed only using api_key -belonging to user with admin rights. +Lists all existing users groups. This command can be executed only using +api_key belonging to user with admin rights. + INPUT:: @@ -154,9 +266,9 @@ OUTPUT:: result : [ { - "id" : "<id>", - "name" : "<name>", - "active": "<bool>", + "id" : "<id>", + "group_name" : "<groupname>", + "active": "<bool>", "members" : [ { "id" : "<userid>", @@ -174,41 +286,6 @@ OUTPUT:: ] error : null -get_users_group ---------------- - -Gets an existing users group. This command can be executed only using api_key -belonging to user with admin rights. - -INPUT:: - - api_key : "<api_key>" - method : "get_users_group" - args : { - "group_name" : "<name>" - } - -OUTPUT:: - - result : None if group not exist - { - "id" : "<id>", - "name" : "<name>", - "active": "<bool>", - "members" : [ - { "id" : "<userid>", - "username" : "<username>", - "firstname": "<firstname>", - "lastname" : "<lastname>", - "email" : "<email>", - "active" : "<bool>", - "admin" : "<bool>", - "ldap" : "<ldap_dn>" - }, - … - ] - } - error : null create_users_group ------------------ @@ -216,12 +293,13 @@ create_users_group Creates new users group. This command can be executed only using api_key belonging to user with admin rights + INPUT:: api_key : "<api_key>" method : "create_users_group" args: { - "name": "<name>", + "group_name": "<groupname>", "active":"<bool> = True" } @@ -229,91 +307,100 @@ OUTPUT:: result: { "id": "<newusersgroupid>", - "msg": "created new users group <name>" + "msg": "created new users group <groupname>" } error: null + add_user_to_users_group ----------------------- -Adds a user to a users group. This command can be executed only using api_key +Adds a user to a users group. If user exists in that group success will be +`false`. This command can be executed only using api_key belonging to user with admin rights + INPUT:: api_key : "<api_key>" method : "add_user_users_group" args: { "group_name" : "<groupname>", - "user_name" : "<username>" + "username" : "<username>" } OUTPUT:: result: { "id": "<newusersgroupmemberid>", - "msg": "created new users group member" + "success": True|False # depends on if member is in group + "msg": "added member <username> to users group <groupname> | + User is already in that group" } error: null -get_repos ---------- -Lists all existing repositories. This command can be executed only using api_key -belonging to user with admin rights +remove_user_from_users_group +---------------------------- + +Removes a user from a users group. If user is not in given group success will +be `false`. This command can be executed only +using api_key belonging to user with admin rights + INPUT:: api_key : "<api_key>" - method : "get_repos" - args: { } + method : "remove_user_from_users_group" + args: { + "group_name" : "<groupname>", + "username" : "<username>" + } OUTPUT:: - result: [ - { - "id" : "<id>", - "name" : "<name>" - "type" : "<type>", - "description" : "<description>" - }, - … - ] + result: { + "success": True|False, # depends on if member is in group + "msg": "removed member <username> from users group <groupname> | + User wasn't in group" + } error: null + get_repo -------- -Gets an existing repository. This command can be executed only using api_key -belonging to user with admin rights +Gets an existing repository by it's name or repository_id. This command can +be executed only using api_key belonging to user with admin rights. + INPUT:: api_key : "<api_key>" method : "get_repo" args: { - "name" : "<name>" + "repoid" : "<reponame or repo_id>" } OUTPUT:: - result: None if repository not exist + result: None if repository does not exist or { "id" : "<id>", - "name" : "<name>" + "repo_name" : "<reponame>" "type" : "<type>", "description" : "<description>", "members" : [ { "id" : "<userid>", - "username" : "<username>", - "firstname": "<firstname>", - "lastname" : "<lastname>", - "email" : "<email>", - "active" : "<bool>", - "admin" : "<bool>", - "ldap" : "<ldap_dn>", - "permission" : "repository.(read|write|admin)" - }, + "username" : "<username>", + "firstname": "<firstname>", + "lastname" : "<lastname>", + "email" : "<email>", + "active" : "<bool>", + "admin" : "<bool>", + "ldap" : "<ldap_dn>", + "permission" : "repository.(read|write|admin)" + }, … { "id" : "<usersgroupid>", @@ -326,6 +413,66 @@ OUTPUT:: } error: null + +get_repos +--------- + +Lists all existing repositories. This command can be executed only using api_key +belonging to user with admin rights + + +INPUT:: + + api_key : "<api_key>" + method : "get_repos" + args: { } + +OUTPUT:: + + result: [ + { + "id" : "<id>", + "repo_name" : "<reponame>" + "type" : "<type>", + "description" : "<description>" + }, + … + ] + error: null + + +get_repo_nodes +-------------- + +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 + + +INPUT:: + + api_key : "<api_key>" + method : "get_repo_nodes" + args: { + "repo_name" : "<reponame>", + "revision" : "<revision>", + "root_path" : "<root_path>", + "ret_type" : "<ret_type>" = 'all' + } + +OUTPUT:: + + result: [ + { + "name" : "<name>" + "type" : "<type>", + }, + … + ] + error: null + + create_repo ----------- @@ -335,58 +482,146 @@ 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. + INPUT:: api_key : "<api_key>" method : "create_repo" args: { - "name" : "<name>", + "repo_name" : "<reponame>", "owner_name" : "<ownername>", "description" : "<description> = ''", "repo_type" : "<type> = 'hg'", - "private" : "<bool> = False" + "private" : "<bool> = False", + "clone_uri" : "<clone_uri> = None", } OUTPUT:: - result: None + result: { + "id": "<newrepoid>", + "msg": "Created new repository <reponame>", + } error: null -add_user_to_repo ----------------- -Add a user to a repository. This command can be executed only using api_key +delete_repo +----------- + +Deletes a repository. This command can be executed only using api_key belonging to user with admin rights. -If "perm" is None, user will be removed from the repository. + INPUT:: api_key : "<api_key>" - method : "add_user_to_repo" + method : "delete_repo" + args: { + "repo_name" : "<reponame>", + } + +OUTPUT:: + + result: { + "msg": "Deleted repository <reponame>", + } + error: null + + +grant_user_permission +--------------------- + +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. + + +INPUT:: + + api_key : "<api_key>" + method : "grant_user_permission" args: { "repo_name" : "<reponame>", - "user_name" : "<username>", - "perm" : "(None|repository.(read|write|admin))", + "username" : "<username>", + "perm" : "(repository.(none|read|write|admin))", } OUTPUT:: - result: None + result: { + "msg" : "Granted perm: <perm> for user: <username> in repo: <reponame>" + } error: null -add_users_group_to_repo ------------------------ -Add a users group to a repository. This command can be executed only using -api_key belonging to user with admin rights. If "perm" is None, group will -be removed from the repository. +revoke_user_permission +---------------------- + +Revoke permission for user on given repository. This command can be executed +only using api_key belonging to user with admin rights. + INPUT:: api_key : "<api_key>" - method : "add_users_group_to_repo" + method : "revoke_user_permission" args: { "repo_name" : "<reponame>", - "group_name" : "<groupname>", - "perm" : "(None|repository.(read|write|admin))", - }
\ No newline at end of file + "username" : "<username>", + } + +OUTPUT:: + + result: { + "msg" : "Revoked perm for user: <suername> in repo: <reponame>" + } + error: null + + +grant_users_group_permission +---------------------------- + +Grant permission for users 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. + + +INPUT:: + + api_key : "<api_key>" + method : "grant_users_group_permission" + args: { + "repo_name" : "<reponame>", + "group_name" : "<usersgroupname>", + "perm" : "(repository.(none|read|write|admin))", + } + +OUTPUT:: + + result: { + "msg" : "Granted perm: <perm> for group: <usersgroupname> in repo: <reponame>" + } + error: null + + +revoke_users_group_permission +----------------------------- + +Revoke permission for users group on given repository.This command can be +executed only using api_key belonging to user with admin rights. + +INPUT:: + + api_key : "<api_key>" + method : "revoke_users_group_permission" + args: { + "repo_name" : "<reponame>", + "users_group" : "<usersgroupname>", + } + +OUTPUT:: + + result: { + "msg" : "Revoked perm for group: <usersgroupname> in repo: <reponame>" + } + error: null
\ No newline at end of file diff --git a/docs/api/index.rst b/docs/api/index.rst deleted file mode 100644 index 88828712..00000000 --- a/docs/api/index.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. _indexapi: - -API Reference -============= - -.. toctree:: - :maxdepth: 3 - - models - api
\ No newline at end of file diff --git a/docs/api/models.rst b/docs/api/models.rst index 61361a63..64b35478 100644 --- a/docs/api/models.rst +++ b/docs/api/models.rst @@ -6,14 +6,29 @@ The :mod:`models` Module .. automodule:: rhodecode.model :members: -.. automodule:: rhodecode.model.permission +.. automodule:: rhodecode.model.comment :members: +.. automodule:: rhodecode.model.notification + :members: + +.. automodule:: rhodecode.model.permission + :members: + +.. automodule:: rhodecode.model.repo_permission + :members: + .. automodule:: rhodecode.model.repo :members: +.. automodule:: rhodecode.model.repos_group + :members: + .. automodule:: rhodecode.model.scm :members: - + .. automodule:: rhodecode.model.user :members: + +.. automodule:: rhodecode.model.users_group + :members:
\ No newline at end of file diff --git a/docs/changelog.rst b/docs/changelog.rst index e102d379..a4c3ae33 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,14 +4,73 @@ Changelog ========= +1.3.0 (**2012-02-XX**) +---------------------- + +:status: in-progress +:branch: beta + +news +++++ + +- code review, inspired by github code-comments +- #215 rst and markdown README files support +- #252 Container-based and proxy pass-through authentication support +- #44 branch browser. Filtering of changelog by branches +- mercurial bookmarks support +- new hover top menu, optimized to add maximum size for important views +- configurable clone url template with possibility to specify protocol like + ssh:// or http:// and also manually alter other parts of clone_url. +- enabled largefiles extension by default +- optimized summary file pages and saved a lot of unused space in them +- #239 option to manually mark repository as fork +- #320 mapping of commit authors to RhodeCode users +- #304 hashes are displayed using monospace font +- diff configuration, toggle white lines and context lines +- #307 configurable diffs, whitespace toggle, increasing context lines +- sorting on branches, tags and bookmarks using YUI datatable +- improved file filter on files page +- implements #330 api method for listing nodes ar particular revision +- #73 added linking issues in commit messages to chosen issue tracker url + based on user defined regular expression +- added linking of changesets in commit messages +- new compact changelog with expandable commit messages +- firstname and lastname are optional in user creation +- #348 added post-create repository hook +- #212 global encoding settings is now configurable from .ini files +- #227 added repository groups permissions +- markdown gets codehilite extensions +- new API methods, delete_repositories, grante/revoke permissions for groups + and repos + + +fixes ++++++ + +- rewrote dbsession management for atomic operations, and better error handling +- fixed sorting of repo tables +- #326 escape of special html entities in diffs +- normalized user_name => username in api attributes +- fixes #298 ldap created users with mixed case emails created conflicts + on saving a form +- fixes issue when owner of a repo couldn't revoke permissions for users + and groups +- fixes #271 rare JSON serialization problem with statistics +- fixes #337 missing validation check for conflicting names of a group with a + repositories group +- #340 fixed session problem for mysql and celery tasks +- fixed #331 RhodeCode mangles repository names if the a repository group + contains the "full path" to the repositories +- #355 RhodeCode doesn't store encrypted LDAP passwords + 1.2.5 (**2012-01-28**) -====================== +---------------------- news ----- +++++ fixes ------ ++++++ - #340 Celery complains about MySQL server gone away, added session cleanup for celery tasks @@ -24,10 +83,10 @@ fixes forking on windows impossible 1.2.4 (**2012-01-19**) -====================== +---------------------- news ----- +++++ - RhodeCode is bundled with mercurial series 2.0.X by default, with full support to largefiles extension. Enabled by default in new installations @@ -35,7 +94,7 @@ news - added requires.txt file with requirements fixes ------ ++++++ - fixes db session issues with celery when emailing admins - #331 RhodeCode mangles repository names if the a repository group @@ -52,10 +111,10 @@ fixes - #316 fixes issues with web description in hgrc files 1.2.3 (**2011-11-02**) -====================== +---------------------- news ----- +++++ - added option to manage repos group for non admin users - added following API methods for get_users, create_user, get_users_groups, @@ -67,24 +126,23 @@ news administrator users, and global config email. fixes ------ ++++++ - added option for passing auth method for smtp mailer - #276 issue with adding a single user with id>10 to usergroups - #277 fixes windows LDAP settings in which missing values breaks the ldap auth - #288 fixes managing of repos in a group for non admin user - 1.2.2 (**2011-10-17**) -====================== +---------------------- news ----- +++++ - #226 repo groups are available by path instead of numerical id fixes ------ ++++++ - #259 Groups with the same name but with different parent group - #260 Put repo in group, then move group to another group -> repo becomes unavailable @@ -98,27 +156,25 @@ fixes - fixes #248 cannot edit repos inside a group on windows - fixes #219 forking problems on windows - 1.2.1 (**2011-10-08**) -====================== +---------------------- news ----- +++++ fixes ------ ++++++ - fixed problems with basic auth and push problems - gui fixes - fixed logger - 1.2.0 (**2011-10-07**) -====================== +---------------------- news ----- +++++ - implemented #47 repository groups - implemented #89 Can setup google analytics code from settings menu @@ -158,7 +214,7 @@ news - Implemented advanced hook management fixes ------ ++++++ - fixed file browser bug, when switching into given form revision the url was not changing @@ -185,18 +241,17 @@ fixes - fixes #218 os.kill patch for windows was missing sig param - improved rendering of dag (they are not trimmed anymore when number of heads exceeds 5) - - + 1.1.8 (**2011-04-12**) -====================== +---------------------- news ----- +++++ - improved windows support fixes ------ ++++++ - fixed #140 freeze of python dateutil library, since new version is python2.x incompatible @@ -219,40 +274,40 @@ fixes 1.1.7 (**2011-03-23**) -====================== +---------------------- news ----- +++++ fixes ------ ++++++ - fixed (again) #136 installation support for FreeBSD 1.1.6 (**2011-03-21**) -====================== +---------------------- news ----- +++++ fixes ------ ++++++ - fixed #136 installation support for FreeBSD - RhodeCode will check for python version during installation 1.1.5 (**2011-03-17**) -====================== +---------------------- news ----- +++++ - basic windows support, by exchanging pybcrypt into sha256 for windows only highly inspired by idea of mantis406 fixes ------ ++++++ - fixed sorting by author in main page - fixed crashes with diffs on binary files @@ -264,13 +319,13 @@ fixes - cleaned out docs, big thanks to Jason Harris 1.1.4 (**2011-02-19**) -====================== +---------------------- news ----- +++++ fixes ------ ++++++ - fixed formencode import problem on settings page, that caused server crash when that page was accessed as first after server start @@ -278,17 +333,17 @@ fixes - fixed option to access repository just by entering http://server/<repo_name> 1.1.3 (**2011-02-16**) -====================== +---------------------- news ----- +++++ - implemented #102 allowing the '.' character in username - added option to access repository just by entering http://server/<repo_name> - celery task ignores result for better performance fixes ------ ++++++ - fixed ehlo command and non auth mail servers on smtp_lib. Thanks to apollo13 and Johan Walles @@ -304,31 +359,31 @@ fixes - fixed static files paths links to use of url() method 1.1.2 (**2011-01-12**) -====================== +---------------------- news ----- +++++ fixes ------ ++++++ - fixes #98 protection against float division of percentage stats - fixed graph bug - forced webhelpers version since it was making troubles during installation 1.1.1 (**2011-01-06**) -====================== +---------------------- news ----- +++++ - added force https option into ini files for easier https usage (no need to set server headers with this options) - small css updates fixes ------ ++++++ - fixed #96 redirect loop on files view on repositories without changesets - fixed #97 unicode string passed into server header in special cases (mod_wsgi) @@ -337,16 +392,16 @@ fixes - fixed #92 whoosh indexer is more error proof 1.1.0 (**2010-12-18**) -====================== +---------------------- news ----- +++++ - rewrite of internals for vcs >=0.1.10 - uses mercurial 1.7 with dotencode disabled for maintaining compatibility with older clients - anonymous access, authentication via ldap -- performance upgrade for cached repos list - each repository has it's own +- performance upgrade for cached repos list - each repository has its own cache that's invalidated when needed. - performance upgrades on repositories with large amount of commits (20K+) - main page quick filter for filtering repositories @@ -365,7 +420,7 @@ news - other than sqlite database backends can be used fixes ------ ++++++ - fixes #61 forked repo was showing only after cache expired - fixes #76 no confirmation on user deletes @@ -385,16 +440,16 @@ fixes 1.0.2 (**2010-11-12**) -====================== +---------------------- news ----- +++++ - tested under python2.7 - bumped sqlalchemy and celery versions fixes ------ ++++++ - fixed #59 missing graph.js - fixed repo_size crash when repository had broken symlinks @@ -402,15 +457,15 @@ fixes 1.0.1 (**2010-11-10**) -====================== +---------------------- news ----- +++++ - small css updated fixes ------ ++++++ - fixed #53 python2.5 incompatible enumerate calls - fixed #52 disable mercurial extension for web @@ -418,7 +473,7 @@ fixes 1.0.0 (**2010-11-02**) -====================== +---------------------- - security bugfix simplehg wasn't checking for permissions on commands other than pull or push. @@ -428,7 +483,7 @@ fixes - permissions cached queries 1.0.0rc4 (**2010-10-12**) -========================== +-------------------------- - fixed python2.5 missing simplejson imports (thanks to Jens Bäckman) - removed cache_manager settings from sqlalchemy meta @@ -438,12 +493,12 @@ fixes 1.0.0rc3 (**2010-10-11**) -========================= +------------------------- - fixed i18n during installation. 1.0.0rc2 (**2010-10-11**) -========================= +------------------------- - Disabled dirsize in file browser, it's causing nasty bug when dir renames occure. After vcs is fixed it'll be put back again. diff --git a/docs/images/.img b/docs/images/.img new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/docs/images/.img diff --git a/docs/images/screenshot1_main_page.png b/docs/images/screenshot1_main_page.png Binary files differdeleted file mode 100644 index 033cca6b..00000000 --- a/docs/images/screenshot1_main_page.png +++ /dev/null diff --git a/docs/images/screenshot2_summary_page.png b/docs/images/screenshot2_summary_page.png Binary files differdeleted file mode 100644 index 7e6aa663..00000000 --- a/docs/images/screenshot2_summary_page.png +++ /dev/null diff --git a/docs/images/screenshot3_changelog_page.png b/docs/images/screenshot3_changelog_page.png Binary files differdeleted file mode 100644 index 8c2e1612..00000000 --- a/docs/images/screenshot3_changelog_page.png +++ /dev/null diff --git a/docs/index.rst b/docs/index.rst index ea38afa6..486a5f9a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -2,8 +2,8 @@ .. include:: ./../README.rst -Documentation -------------- +Users Guide +----------- **Installation:** @@ -20,10 +20,9 @@ Documentation :maxdepth: 1 usage/general - usage/enable_git + usage/git_support usage/statistics usage/backup - usage/api_key_access **Develop** @@ -36,9 +35,10 @@ Documentation **API** .. toctree:: - :maxdepth: 2 + :maxdepth: 1 - api/index + api/api + api/models Other topics diff --git a/docs/screenshots.rst b/docs/screenshots.rst deleted file mode 100644 index d0a19e36..00000000 --- a/docs/screenshots.rst +++ /dev/null @@ -1,13 +0,0 @@ -.. _screenshots: - -.. figure:: images/screenshot1_main_page.png - - Main page of RhodeCode - -.. figure:: images/screenshot2_summary_page.png - - Summary page - -.. figure:: images/screenshot3_changelog_page.png - - Changelog with DAG graph
\ No newline at end of file diff --git a/docs/setup.rst b/docs/setup.rst index c26e05ef..7bff89c7 100755 --- a/docs/setup.rst +++ b/docs/setup.rst @@ -346,6 +346,106 @@ All other LDAP settings will likely be site-specific and should be appropriately configured. +Authentication by container or reverse-proxy +-------------------------------------------- + +Starting with version 1.3, RhodeCode supports delegating the authentication +of users to its WSGI container, or to a reverse-proxy server through which all +clients access the application. + +When these authentication methods are enabled in RhodeCode, it uses the +username that the container/proxy (Apache/Nginx/etc) authenticated and doesn't +perform the authentication itself. The authorization, however, is still done by +RhodeCode according to its settings. + +When a user logs in for the first time using these authentication methods, +a matching user account is created in RhodeCode with default permissions. An +administrator can then modify it using RhodeCode's admin interface. +It's also possible for an administrator to create accounts and configure their +permissions before the user logs in for the first time. + +Container-based authentication +'''''''''''''''''''''''''''''' + +In a container-based authentication setup, RhodeCode reads the user name from +the ``REMOTE_USER`` server variable provided by the WSGI container. + +After setting up your container (see `Apache's WSGI config`_), you'd need +to configure it to require authentication on the location configured for +RhodeCode. + +In order for RhodeCode to start using the provided username, you should set the +following in the [app:main] section of your .ini file:: + + container_auth_enabled = true + + +Proxy pass-through authentication +''''''''''''''''''''''''''''''''' + +In a proxy pass-through authentication setup, RhodeCode reads the user name +from the ``X-Forwarded-User`` request header, which should be configured to be +sent by the reverse-proxy server. + +After setting up your proxy solution (see `Apache virtual host reverse proxy example`_, +`Apache as subdirectory`_ or `Nginx virtual host example`_), you'd need to +configure the authentication and add the username in a request header named +``X-Forwarded-User``. + +For example, the following config section for Apache sets a subdirectory in a +reverse-proxy setup with basic auth:: + + <Location /<someprefix> > + ProxyPass http://127.0.0.1:5000/<someprefix> + ProxyPassReverse http://127.0.0.1:5000/<someprefix> + SetEnvIf X-Url-Scheme https HTTPS=1 + + AuthType Basic + AuthName "RhodeCode authentication" + AuthUserFile /home/web/rhodecode/.htpasswd + require valid-user + + RequestHeader unset X-Forwarded-User + + RewriteEngine On + RewriteCond %{LA-U:REMOTE_USER} (.+) + RewriteRule .* - [E=RU:%1] + RequestHeader set X-Forwarded-User %{RU}e + </Location> + +In order for RhodeCode to start using the forwarded username, you should set +the following in the [app:main] section of your .ini file:: + + proxypass_auth_enabled = true + +.. note:: + If you enable proxy pass-through authentication, make sure your server is + only accessible through the proxy. Otherwise, any client would be able to + forge the authentication header and could effectively become authenticated + using any account of their liking. + +Integration with Issue trackers +------------------------------- + +RhodeCode provides a simple integration with issue trackers. It's possible +to define a regular expression that will fetch issue id stored in commit +messages and replace that with an url to this issue. To enable this simply +uncomment following variables in the ini file:: + + url_pat = (?:^#|\s#)(\w+) + issue_server_link = https://myissueserver.com/{repo}/issue/{id} + issue_prefix = # + +`url_pat` is the regular expression that will fetch issues from commit messages. +Default regex will match issues in format of #<number> eg. #300. + +Matched issues will be replace with the link specified as `issue_server_link` +{id} will be replaced with issue id, and {repo} with repository name. +Since the # is striped `issue_prefix` is added as a prefix to url. +`issue_prefix` can be something different than # if you pass +ISSUE- as issue prefix this will generate an url in format:: + + <a href="https://myissueserver.com/example_repo/issue/300">ISSUE-300</a> Hook management --------------- @@ -361,6 +461,17 @@ To add another custom hook simply fill in first section with can be found at *rhodecode.lib.hooks*. +Changing default encoding +------------------------- + +By default RhodeCode uses utf8 encoding, starting from 1.3 series this +can be changed, simply edit default_encoding in .ini file to desired one. +This affects many parts in rhodecode including commiters names, filenames, +encoding of commit messages. In addition RhodeCode can detect if `chardet` +library is installed. If `chardet` is detected RhodeCode will fallback to it +when there are encode/decode errors. + + Setting Up Celery ----------------- @@ -397,27 +508,36 @@ Nginx virtual host example Sample config for nginx using proxy:: + upstream rc { + server 127.0.0.1:5000; + # add more instances for load balancing + #server 127.0.0.1:5001; + #server 127.0.0.1:5002; + } + server { listen 80; server_name hg.myserver.com; access_log /var/log/nginx/rhodecode.access.log; error_log /var/log/nginx/rhodecode.error.log; + location / { - root /var/www/rhodecode/rhodecode/public/; - if (!-f $request_filename){ - proxy_pass http://127.0.0.1:5000; - } - #this is important if you want to use https !!! - proxy_set_header X-Url-Scheme $scheme; - include /etc/nginx/proxy.conf; + try_files $uri @rhode; } + + location @rhode { + proxy_pass http://rc; + include /etc/nginx/proxy.conf; + } + } Here's the proxy.conf. It's tuned so it will not timeout on long pushes or large pushes:: - + proxy_redirect off; proxy_set_header Host $host; + proxy_set_header X-Url-Scheme $scheme; proxy_set_header X-Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; diff --git a/docs/theme/nature/layout.html b/docs/theme/nature/layout.html index 6cf39b94..ce3487ef 100644 --- a/docs/theme/nature/layout.html +++ b/docs/theme/nature/layout.html @@ -1,12 +1,12 @@ {% extends "basic/layout.html" %} {% block sidebarlogo %} -<h3>Support my development effort.</h3> +<h3>Support RhodeCode development.</h3> <div style="text-align:center"> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="8U2LLRPLBKWDU"> - <input style="border:0px !important" type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" + <input style="border:0px !important" type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form> diff --git a/docs/usage/api_key_access.rst b/docs/usage/api_key_access.rst deleted file mode 100644 index 1aa014ad..00000000 --- a/docs/usage/api_key_access.rst +++ /dev/null @@ -1,11 +0,0 @@ -.. _api_key_access: - -Access to RhodeCode via API KEY -=============================== - -Starting from version 1.2 rss/atom feeds and journal feeds -can be accessed via **api_key**. This unique key is automatically generated for -each user in RhodeCode application. Using this key it is possible to access -feeds without having to log in. When user changes his password a new API KEY -is generated for him automatically. You can check your API KEY in account -settings page.
\ No newline at end of file diff --git a/docs/usage/enable_git.rst b/docs/usage/enable_git.rst deleted file mode 100644 index 2f5bb899..00000000 --- a/docs/usage/enable_git.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. _enable_git: - -Enabling GIT support (beta) -=========================== - - -Git support in RhodeCode 1.1 was disabled due to current instability issues. -However,if you would like to test git support please feel free to re-enable it. -To re-enable GIT support just uncomment the git line in the -file **rhodecode/__init__.py** - -.. code-block:: python - - BACKENDS = { - 'hg': 'Mercurial repository', - #'git': 'Git repository', - } - -.. note:: - Please note that the git support provided by RhodeCode is not yet fully - stable and RhodeCode might crash while using git repositories. (That is why - it is currently disabled.) Thus be careful about enabling git support, and - certainly don't use it in a production setting! -
\ No newline at end of file diff --git a/docs/usage/general.rst b/docs/usage/general.rst index f6a39579..18f6b4cd 100644 --- a/docs/usage/general.rst +++ b/docs/usage/general.rst @@ -36,6 +36,31 @@ Compare view is also available from the journal on pushes having more than one changeset +Non changeable repository urls +------------------------------ + +Due to complicated nature of repository grouping, often urls of repositories +can change. + +example:: + + #before + http://server.com/repo_name + # after insertion to test_group group the url will be + http://server.com/test_group/repo_name + +This can be an issue for build systems and any other hardcoded scripts, moving +repository to a group leads to a need for changing external systems. To +overcome this RhodeCode introduces a non changable replacement url. It's +simply an repository ID prefixed with `_` above urls are also accessible as:: + + http://server.com/_<ID> + +Since ID are always the same moving the repository will not affect such url. +the _<ID> syntax can be used anywhere in the system so urls with repo_name +for changelogs, files and other can be exchanged with _<ID> syntax. + + Mailing ------- diff --git a/docs/usage/git_support.rst b/docs/usage/git_support.rst new file mode 100644 index 00000000..7526163c --- /dev/null +++ b/docs/usage/git_support.rst @@ -0,0 +1,48 @@ +.. _git_support: + +GIT support +=========== + + +Git support in RhodeCode 1.3 was enabled by default. +Although There are some limitations on git usage. + +- No hooks are runned for git push/pull actions. +- logs in action journals don't have git operations +- large pushes needs http server with chunked encoding support. + +if you plan to use git you need to run RhodeCode with some +http server that supports chunked encoding which git http protocol uses, +i recommend using waitress_ or gunicorn_ (linux only) for `paste` wsgi app +replacement. + +To use waitress simply change change the following in the .ini file:: + + use = egg:Paste#http + +To:: + + use = egg:waitress#main + +And comment out bellow options:: + + threadpool_workers = + threadpool_max_requests = + use_threadpool = + + +You can simply run `paster serve` as usual. + + +You can always disable git/hg support by editing a +file **rhodecode/__init__.py** and commenting out backends + +.. code-block:: python + + BACKENDS = { + 'hg': 'Mercurial repository', + #'git': 'Git repository', + } + +.. _waitress: http://pypi.python.org/pypi/waitress +.. _gunicorn: http://pypi.python.org/pypi/gunicorn
\ No newline at end of file |