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
Can view the tags added to components in the library.
Cannot see any "Add tags" buttons in the Content Tags Sidebar.
Cannot see the "Manage Tags" button in the Content Tags Sidebar.
Currently, read-only users can try to add tags, but get 403 errors from the backend on Save.
This will require backend changes too.
Background
The can_tag_object permission is dependent on the taxonomy + object ID, and so "Manage Tags" should be shown if the user can_tag_object for any of the available taxonomies.
But, we're getting our list of available taxonomies and tags from the /api/content_tagging/v1/taxonomies/?enabled=true&org=<org_name> REST endpoint, which doesn't take an Object ID. And so we can't check whether the user is allowed to tag this particular object with the returned taxonomies. So this endpoint returns taxonomies with can_tag_object = True, because it's true that the user can use these taxonomies in general, just not on this particular object.
Suggested approach
Update the /taxonomies endpoint to take an optional object_id, and use that to determine the can_tag_object permission.
Update the Authoring MFE to aggregate the can_tag_object permissions for all the taxonomies, and if none are True, hide the Manage Tags button in the sidebar.
The text was updated successfully, but these errors were encountered:
@pomegranited CC @ChrisChV Your suggestions make sense, but isn't it simpler just to change the <ContentTagsDrawer> component so it takes a readOnly boolean, and when the library is read-only (as we already know on the frontend), we pass that parameter? Then the tags widget will hide the Manage/Add buttons, without bothering to "listen" to what the backend is saying.
I don't think we have to worry about a situation where some taxonomies are read-write and others are read-only.
Acceptance Criteria
Users with read-only access to a library:
Currently, read-only users can try to add tags, but get 403 errors from the backend on Save.
This will require backend changes too.
Background
The
can_tag_object
permission is dependent on the taxonomy + object ID, and so "Manage Tags" should be shown if the usercan_tag_object
for any of the available taxonomies.But, we're getting our list of available taxonomies and tags from the
/api/content_tagging/v1/taxonomies/?enabled=true&org=<org_name>
REST endpoint, which doesn't take an Object ID. And so we can't check whether the user is allowed to tag this particular object with the returned taxonomies. So this endpoint returns taxonomies withcan_tag_object = True
, because it's true that the user can use these taxonomies in general, just not on this particular object.Suggested approach
/taxonomies
endpoint to take an optionalobject_id
, and use that to determine thecan_tag_object
permission.object_id
into the/taxonomies
endpoint -- this should fix point [BD-03] [BB-2542] ]Add discussions configuration UI wireframe in MFE #2.can_tag_object
permissions for all the taxonomies, and if none areTrue
, hide theManage Tags
button in the sidebar.The text was updated successfully, but these errors were encountered: