##// END OF EJS Templates
docs: added admin section docs about problematic PR deletion
super-admin -
r4732:482b6890 stable
parent child Browse files
Show More
@@ -101,4 +101,18 b" 2b) Add user called 'admin' into all rep"
101 In [3]: permission_name = 'group.write'
101 In [3]: permission_name = 'group.write'
102 In [4]: for repo_group in RepoGroup.get_all():
102 In [4]: for repo_group in RepoGroup.get_all():
103 ...: RepoGroupModel().grant_user_permission(repo_group, user, permission_name)
103 ...: RepoGroupModel().grant_user_permission(repo_group, user, permission_name)
104 ...: Session().commit() No newline at end of file
104 ...: Session().commit()
105
106
107 Delete a problematic pull request
108 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
109
110 .. code-block:: python
111 :dedent: 1
112
113 In [1]: from rhodecode.model.pull_request import PullRequestModel
114 In [2]: pullrequest_id = 123
115 In [3]: pr = PullRequest.get(pullrequest_id)
116 In [4]: super_admin = User.get_first_super_admin()
117 In [5]: PullRequestModel().delete(pr, super_admin)
118 In [6]: Session().commit()
General Comments 0
You need to be logged in to leave comments. Login now