diff --git a/docs/admin/user-admin.rst b/docs/admin/user-admin.rst --- a/docs/admin/user-admin.rst +++ b/docs/admin/user-admin.rst @@ -13,11 +13,12 @@ permissions applied to it; |perm|. .. toctree:: - public-access - default-user-perms - adding-anonymous-user - adding-new-user - setting-default-permissions - setting-usergroup-permissions + user_admin/public-access + user_admin/default-user-perms + user_admin/adding-anonymous-user + user_admin/adding-new-user + user_admin/setting-default-permissions + user_admin/setting-usergroup-permissions + user_admin/user-admin-tasks -.. |perm| replace:: **None**, **Read**, **Write**, or **Admin** \ No newline at end of file +.. |perm| replace:: **None**, **Read**, **Write**, or **Admin** diff --git a/docs/admin/adding-anonymous-user.rst b/docs/admin/user_admin/adding-anonymous-user.rst rename from docs/admin/adding-anonymous-user.rst rename to docs/admin/user_admin/adding-anonymous-user.rst diff --git a/docs/admin/adding-new-user.rst b/docs/admin/user_admin/adding-new-user.rst rename from docs/admin/adding-new-user.rst rename to docs/admin/user_admin/adding-new-user.rst diff --git a/docs/admin/default-user-perms.rst b/docs/admin/user_admin/default-user-perms.rst rename from docs/admin/default-user-perms.rst rename to docs/admin/user_admin/default-user-perms.rst diff --git a/docs/admin/public-access.rst b/docs/admin/user_admin/public-access.rst rename from docs/admin/public-access.rst rename to docs/admin/user_admin/public-access.rst diff --git a/docs/admin/setting-default-permissions.rst b/docs/admin/user_admin/setting-default-permissions.rst rename from docs/admin/setting-default-permissions.rst rename to docs/admin/user_admin/setting-default-permissions.rst diff --git a/docs/admin/setting-usergroup-permissions.rst b/docs/admin/user_admin/setting-usergroup-permissions.rst rename from docs/admin/setting-usergroup-permissions.rst rename to docs/admin/user_admin/setting-usergroup-permissions.rst diff --git a/docs/admin/user_admin/user-admin-tasks.rst b/docs/admin/user_admin/user-admin-tasks.rst new file mode 100644 --- /dev/null +++ b/docs/admin/user_admin/user-admin-tasks.rst @@ -0,0 +1,24 @@ +.. _user-admin-tasks: + +Common Admin Tasks for Users +---------------------------- + + +Manually Set Personal Repository Group +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Here is how to set a repository group as personal for a user using ishell. + + +.. code-block:: bash + + # starts the ishell interactive prompt + $ rccontrol ishell enterprise-1 + +.. code-block:: python + + In [1]: repo_group = RepoGroup.get_by_group_name('some_group_name') + In [2]: user = User.get_by_username('some_user') + In [3]: repo_group.user = user + In [4]: repo_group.personal = True + In [5]: Session().add(repo_group);Session().commit() diff --git a/docs/index.rst b/docs/index.rst --- a/docs/index.rst +++ b/docs/index.rst @@ -64,6 +64,13 @@ and commit files and |repos| while manag .. toctree:: :maxdepth: 1 + :caption: User Documentation + + usage/basic-usage + tutorials/tutorials + +.. toctree:: + :maxdepth: 1 :caption: Developer Documentation api/api @@ -73,13 +80,6 @@ and commit files and |repos| while manag .. toctree:: :maxdepth: 1 - :caption: User Documentation - - usage/basic-usage - tutorials/tutorials - -.. toctree:: - :maxdepth: 1 :caption: About known-issues/known-issues diff --git a/rhodecode/apps/admin/views/users.py b/rhodecode/apps/admin/views/users.py --- a/rhodecode/apps/admin/views/users.py +++ b/rhodecode/apps/admin/views/users.py @@ -682,8 +682,7 @@ class UsersView(UserAppView): if personal_repo_group: raise HTTPFound(h.route_path('user_edit_advanced', user_id=user_id)) - personal_repo_group_name = RepoGroupModel().get_personal_group_name( - c.user) + personal_repo_group_name = RepoGroupModel().get_personal_group_name(c.user) named_personal_group = RepoGroup.get_by_group_name( personal_repo_group_name) try: diff --git a/rhodecode/apps/ssh_support/lib/backends/hg.py b/rhodecode/apps/ssh_support/lib/backends/hg.py --- a/rhodecode/apps/ssh_support/lib/backends/hg.py +++ b/rhodecode/apps/ssh_support/lib/backends/hg.py @@ -42,7 +42,7 @@ class MercurialTunnelWrapper(object): def create_hooks_env(self): repo_name = self.server.repo_name - hg_flags = self.config_to_hgrc(repo_name) + hg_flags = self.server.config_to_hgrc(repo_name) content = textwrap.dedent( ''' diff --git a/rhodecode/lib/vcs/backends/hg/repository.py b/rhodecode/lib/vcs/backends/hg/repository.py --- a/rhodecode/lib/vcs/backends/hg/repository.py +++ b/rhodecode/lib/vcs/backends/hg/repository.py @@ -897,11 +897,15 @@ class MercurialRepository(BaseRepository def read_patterns(suffix): svalue = None - try: - svalue = hgacl.get('narrowhgacl', username + suffix) - except configparser.NoOptionError: + for section, option in [ + ('narrowacl', username + suffix), + ('narrowacl', 'default' + suffix), + ('narrowhgacl', username + suffix), + ('narrowhgacl', 'default' + suffix) + ]: try: - svalue = hgacl.get('narrowhgacl', 'default' + suffix) + svalue = hgacl.get(section, option) + break # stop at the first value we find except configparser.NoOptionError: pass if not svalue: diff --git a/rhodecode/model/forms.py b/rhodecode/model/forms.py --- a/rhodecode/model/forms.py +++ b/rhodecode/model/forms.py @@ -618,7 +618,7 @@ def PullRequestForm(localizer, repo_id): revisions = All(#v.NotReviewedRevisions(localizer, repo_id)(), v.UniqueList(localizer)(not_empty=True)) review_members = formencode.ForEach(ReviewerForm()) - pullrequest_title = v.UnicodeString(strip=True, required=True, min=3, max=255) + pullrequest_title = v.UnicodeString(strip=True, required=True, min=1, max=255) pullrequest_desc = v.UnicodeString(strip=True, required=False) description_renderer = v.UnicodeString(strip=True, required=False) diff --git a/rhodecode/model/repo_group.py b/rhodecode/model/repo_group.py --- a/rhodecode/model/repo_group.py +++ b/rhodecode/model/repo_group.py @@ -97,6 +97,8 @@ class RepoGroupModel(BaseModel): return string.Template(template).safe_substitute( username=user.username, user_id=user.user_id, + first_name=user.first_name, + last_name=user.last_name, ) def create_personal_repo_group(self, user, commit_early=True): diff --git a/rhodecode/templates/summary/summary_commits.mako b/rhodecode/templates/summary/summary_commits.mako --- a/rhodecode/templates/summary/summary_commits.mako +++ b/rhodecode/templates/summary/summary_commits.mako @@ -97,8 +97,13 @@