##// END OF EJS Templates
merge default into new-ui
marcink -
r3661:3b2bbc4a merge new-ui
parent child Browse files
Show More
@@ -0,0 +1,24 b''
1 .. _user-admin-tasks:
2
3 Common Admin Tasks for Users
4 ----------------------------
5
6
7 Manually Set Personal Repository Group
8 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9
10 Here is how to set a repository group as personal for a user using ishell.
11
12
13 .. code-block:: bash
14
15 # starts the ishell interactive prompt
16 $ rccontrol ishell enterprise-1
17
18 .. code-block:: python
19
20 In [1]: repo_group = RepoGroup.get_by_group_name('some_group_name')
21 In [2]: user = User.get_by_username('some_user')
22 In [3]: repo_group.user = user
23 In [4]: repo_group.personal = True
24 In [5]: Session().add(repo_group);Session().commit()
@@ -13,11 +13,12 b' permissions applied to it; |perm|.'
13
13
14 .. toctree::
14 .. toctree::
15
15
16 public-access
16 user_admin/public-access
17 default-user-perms
17 user_admin/default-user-perms
18 adding-anonymous-user
18 user_admin/adding-anonymous-user
19 adding-new-user
19 user_admin/adding-new-user
20 setting-default-permissions
20 user_admin/setting-default-permissions
21 setting-usergroup-permissions
21 user_admin/setting-usergroup-permissions
22 user_admin/user-admin-tasks
22
23
23 .. |perm| replace:: **None**, **Read**, **Write**, or **Admin** No newline at end of file
24 .. |perm| replace:: **None**, **Read**, **Write**, or **Admin**
1 NO CONTENT: file renamed from docs/admin/adding-anonymous-user.rst to docs/admin/user_admin/adding-anonymous-user.rst
NO CONTENT: file renamed from docs/admin/adding-anonymous-user.rst to docs/admin/user_admin/adding-anonymous-user.rst
1 NO CONTENT: file renamed from docs/admin/adding-new-user.rst to docs/admin/user_admin/adding-new-user.rst
NO CONTENT: file renamed from docs/admin/adding-new-user.rst to docs/admin/user_admin/adding-new-user.rst
1 NO CONTENT: file renamed from docs/admin/default-user-perms.rst to docs/admin/user_admin/default-user-perms.rst
NO CONTENT: file renamed from docs/admin/default-user-perms.rst to docs/admin/user_admin/default-user-perms.rst
1 NO CONTENT: file renamed from docs/admin/public-access.rst to docs/admin/user_admin/public-access.rst
NO CONTENT: file renamed from docs/admin/public-access.rst to docs/admin/user_admin/public-access.rst
1 NO CONTENT: file renamed from docs/admin/setting-default-permissions.rst to docs/admin/user_admin/setting-default-permissions.rst
NO CONTENT: file renamed from docs/admin/setting-default-permissions.rst to docs/admin/user_admin/setting-default-permissions.rst
1 NO CONTENT: file renamed from docs/admin/setting-usergroup-permissions.rst to docs/admin/user_admin/setting-usergroup-permissions.rst
NO CONTENT: file renamed from docs/admin/setting-usergroup-permissions.rst to docs/admin/user_admin/setting-usergroup-permissions.rst
@@ -64,6 +64,13 b' and commit files and |repos| while manag'
64
64
65 .. toctree::
65 .. toctree::
66 :maxdepth: 1
66 :maxdepth: 1
67 :caption: User Documentation
68
69 usage/basic-usage
70 tutorials/tutorials
71
72 .. toctree::
73 :maxdepth: 1
67 :caption: Developer Documentation
74 :caption: Developer Documentation
68
75
69 api/api
76 api/api
@@ -73,13 +80,6 b' and commit files and |repos| while manag'
73
80
74 .. toctree::
81 .. toctree::
75 :maxdepth: 1
82 :maxdepth: 1
76 :caption: User Documentation
77
78 usage/basic-usage
79 tutorials/tutorials
80
81 .. toctree::
82 :maxdepth: 1
83 :caption: About
83 :caption: About
84
84
85 known-issues/known-issues
85 known-issues/known-issues
@@ -682,8 +682,7 b' class UsersView(UserAppView):'
682 if personal_repo_group:
682 if personal_repo_group:
683 raise HTTPFound(h.route_path('user_edit_advanced', user_id=user_id))
683 raise HTTPFound(h.route_path('user_edit_advanced', user_id=user_id))
684
684
685 personal_repo_group_name = RepoGroupModel().get_personal_group_name(
685 personal_repo_group_name = RepoGroupModel().get_personal_group_name(c.user)
686 c.user)
687 named_personal_group = RepoGroup.get_by_group_name(
686 named_personal_group = RepoGroup.get_by_group_name(
688 personal_repo_group_name)
687 personal_repo_group_name)
689 try:
688 try:
@@ -42,7 +42,7 b' class MercurialTunnelWrapper(object):'
42
42
43 def create_hooks_env(self):
43 def create_hooks_env(self):
44 repo_name = self.server.repo_name
44 repo_name = self.server.repo_name
45 hg_flags = self.config_to_hgrc(repo_name)
45 hg_flags = self.server.config_to_hgrc(repo_name)
46
46
47 content = textwrap.dedent(
47 content = textwrap.dedent(
48 '''
48 '''
@@ -897,11 +897,15 b' class MercurialRepository(BaseRepository'
897
897
898 def read_patterns(suffix):
898 def read_patterns(suffix):
899 svalue = None
899 svalue = None
900 try:
900 for section, option in [
901 svalue = hgacl.get('narrowhgacl', username + suffix)
901 ('narrowacl', username + suffix),
902 except configparser.NoOptionError:
902 ('narrowacl', 'default' + suffix),
903 ('narrowhgacl', username + suffix),
904 ('narrowhgacl', 'default' + suffix)
905 ]:
903 try:
906 try:
904 svalue = hgacl.get('narrowhgacl', 'default' + suffix)
907 svalue = hgacl.get(section, option)
908 break # stop at the first value we find
905 except configparser.NoOptionError:
909 except configparser.NoOptionError:
906 pass
910 pass
907 if not svalue:
911 if not svalue:
@@ -618,7 +618,7 b' def PullRequestForm(localizer, repo_id):'
618 revisions = All(#v.NotReviewedRevisions(localizer, repo_id)(),
618 revisions = All(#v.NotReviewedRevisions(localizer, repo_id)(),
619 v.UniqueList(localizer)(not_empty=True))
619 v.UniqueList(localizer)(not_empty=True))
620 review_members = formencode.ForEach(ReviewerForm())
620 review_members = formencode.ForEach(ReviewerForm())
621 pullrequest_title = v.UnicodeString(strip=True, required=True, min=3, max=255)
621 pullrequest_title = v.UnicodeString(strip=True, required=True, min=1, max=255)
622 pullrequest_desc = v.UnicodeString(strip=True, required=False)
622 pullrequest_desc = v.UnicodeString(strip=True, required=False)
623 description_renderer = v.UnicodeString(strip=True, required=False)
623 description_renderer = v.UnicodeString(strip=True, required=False)
624
624
@@ -97,6 +97,8 b' class RepoGroupModel(BaseModel):'
97 return string.Template(template).safe_substitute(
97 return string.Template(template).safe_substitute(
98 username=user.username,
98 username=user.username,
99 user_id=user.user_id,
99 user_id=user.user_id,
100 first_name=user.first_name,
101 last_name=user.last_name,
100 )
102 )
101
103
102 def create_personal_repo_group(self, user, commit_early=True):
104 def create_personal_repo_group(self, user, commit_early=True):
@@ -97,8 +97,13 b''
97 </table>
97 </table>
98
98
99 <script type="text/javascript">
99 <script type="text/javascript">
100 $(document).pjax('#shortlog_data .pager_link','#shortlog_data', {timeout: 2000, scrollTo: false, push: false});
100 $(document).pjax('#shortlog_data .pager_link','#shortlog_data', {timeout: 5000, scrollTo: false, push: false});
101 $(document).on('pjax:success', function(){ timeagoActivate(); });
101 $(document).on('pjax:success', function(){ timeagoActivate(); });
102 $(document).on('pjax:timeout', function(event) {
103 // Prevent default timeout redirection behavior
104 event.preventDefault()
105 })
106
102 </script>
107 </script>
103
108
104 <div class="pagination-wh pagination-left">
109 <div class="pagination-wh pagination-left">
General Comments 0
You need to be logged in to leave comments. Login now