summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/api-usage.rst10
-rw-r--r--docs/cli.rst6
2 files changed, 16 insertions, 0 deletions
diff --git a/docs/api-usage.rst b/docs/api-usage.rst
index 85e4b1f..b6a498d 100644
--- a/docs/api-usage.rst
+++ b/docs/api-usage.rst
@@ -117,3 +117,13 @@ Use the ``all`` parameter to get all the items:
.. code-block:: python
all_groups = gl.groups.list(all=True)
+
+Sudo
+====
+
+If you have the administrator status, you can use ``sudo`` to act as another
+user. For example:
+
+.. code-block:: python
+
+ p = gl.projects.create({'name': 'awesome_project'}, sudo='user1')
diff --git a/docs/cli.rst b/docs/cli.rst
index 2d150e6..53ef83f 100644
--- a/docs/cli.rst
+++ b/docs/cli.rst
@@ -189,3 +189,9 @@ Define the status of a commit (as would be done from a CI tool for example):
--commit-id a43290c --state success --name ci/jenkins \
--target-url http://server/build/123 \
--description "Jenkins build succeeded"
+
+Use sudo to act as another user (admin only):
+
+.. code-block:: console
+
+ $ gitlab project create --name user_project1 --sudo username