Skip to content

Commit

Permalink
tweak docs IQSS#9887
Browse files Browse the repository at this point in the history
  • Loading branch information
pdurbin committed Apr 12, 2024
1 parent 3f89c32 commit 95ce8e0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion doc/sphinx-guides/source/api/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This API changelog is experimental and we would love feedback on its usefulness.
v6.3
----

- **/api/admin/superuser/{identifier}**: The POST endpoint is being deprecated in favor for the PUT, which we can specifically set the superuser status in the body.
- **/api/admin/superuser/{identifier}**: The POST endpoint that toggles superuser status has been deprecated in favor of a new PUT endpoint that allows you to specify true or false. See :ref:`set-superuser-status`.

v6.2
----
Expand Down
26 changes: 19 additions & 7 deletions doc/sphinx-guides/source/api/native-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5415,31 +5415,43 @@ This action changes the identifier of user johnsmith to jsmith.
Toggle Superuser Status
~~~~~~~~~~~~~~~~~~~~~~~
Toggles superuser mode on the ``AuthenticatedUser`` whose ``identifier`` (without the ``@`` sign) is passed. ::
Toggle the superuser status of a user.
POST http://$SERVER/api/admin/superuser/$identifier
.. note:: This endpoint is deprecated as explained in :doc:`/api/changelog`. Please use the :ref:`set-superuser-status` endpoint instead.
.. note:: This endpoint is deprecated. Use the set superuser status endpoint instead.
.. code-block:: bash
export SERVER_URL=http://localhost:8080
export USERNAME=jdoe
curl -X POST "$SERVER_URL/api/admin/superuser/$USERNAME"
.. _change-superuser-status:
The fully expanded example above (without environment variables) looks like this:
.. code-block:: bash
curl -X POST "http://localhost:8080/api/admin/superuser/jdoe"
.. _set-superuser-status:
Set Superuser Status
~~~~~~~~~~~~~~~~~~~~
Specify the superuser status of a user with a boolean value.
Specify the superuser status of a user with a boolean value (``true`` or ``false``).
.. note:: See :ref:`curl-examples-and-environment-variables` if you are unfamiliar with the use of ``export`` below.
.. code-block:: bash
export SERVER_URL=http://localhost:8080
export USERNAME=jdoe
export IS_SUPERUSER=true
curl -X PUT "$SERVER/api/admin/superuser/$USERNAME" -d "$IS_SUPERUSER"
curl -X PUT "$SERVER_URL/api/admin/superuser/$USERNAME" -d "$IS_SUPERUSER"
The fully expanded example above (without environment variables) looks like this:
.. code-block:: bash
curl -X PUT "http://localhost:8080/api/admin/superuser/jdoe" -d "true"
curl -X PUT "http://localhost:8080/api/admin/superuser/jdoe" -d true
.. _delete-a-user:
Expand Down

0 comments on commit 95ce8e0

Please sign in to comment.