You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The [Show Role](https://dataverse-guide--11116.org.readthedocs.build/en/11116/api/native-api.html#show-role) API endpoint was returning 401 Unauthorized when a permission check failed. This has been corrected to return 403 Forbidden instead. That is, the API token is known to be good (401 otherwise) but the user lacks permission (403 is now sent). See also the [API Changelog](https://dataverse-guide--11116.org.readthedocs.build/en/11116/api/changelog.html), #10340, and #11116.
Copy file name to clipboardexpand all lines: doc/sphinx-guides/source/api/changelog.rst
+1
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ v6.6
11
11
----
12
12
13
13
- **/api/metadatablocks** is no longer returning duplicated metadata properties and does not omit metadata properties when called.
14
+
- **/api/roles**: :ref:`show-role` now properly returns 403 Forbidden instead of 401 Unauthorized when you pass a working API token that doesn't have the right permission.
For ``roles.json`` see :ref:`json-representation-of-a-role`
447
447
@@ -4583,17 +4583,49 @@ Create Role
4583
4583
4584
4584
Roles can be created globally (:ref:`create-global-role`) or for individual Dataverse collections (:ref:`create-role-in-collection`).
4585
4585
4586
+
.. _show-role:
4587
+
4586
4588
Show Role
4587
4589
~~~~~~~~~
4588
4590
4589
-
Shows the role with ``id``::
4591
+
You must have ``ManageDataversePermissions`` to be able to show a role that was created using :ref:`create-role-in-collection`. Global roles (:ref:`create-global-role`) can only be shown with a superuser API token.
0 commit comments