Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tagging] Handle import course when the current user does not have permission #204

Closed
ChrisChV opened this issue Apr 2, 2024 · 8 comments

Comments

@ChrisChV
Copy link

ChrisChV commented Apr 2, 2024

This is a follow-up ticket of the Scenario 4 in #182

Scenario 4: Tags in the OLX match a Taxonomy (by Export ID) but the current user does not have permission to view/use that taxonomy [because it's linked to a different org]:
Tags will be imported and visible in Studio. Course author will be able to delete them if they want. Course author will not be able to add additional tags from the same taxonomy though, because they don't have permission.

Currently these types of tags are imported and created without problems, but since the user does not have permissions they do not appear in Studio (Manage tags drawer).

Acceptance Criteria

  • Course author will be abble to import tags, but if does not have permission to view/use that taxonomy [because it's linked to a different org]: Tags will be imported and visible in Studio
  • Course author will be able to delete them if they want. Course author will not be able to add additional tags from the same taxonomy though, because they don't have permission. (ref)

Extra information

@ChrisChV
Copy link
Author

ChrisChV commented Apr 2, 2024

Continue the disscussion here.
openedx/edx-platform#34356 (comment)

Is there some way we could do it without changing the taxonomy permissions or retrieving "all taxonomies"? Perhaps just list all the objecttags and if any don't match the "allowed" taxonomies, we can display the rest under a heading like "Other Tags"

@bradenmacdonald Yes, it is possible, easier and cleaner. I just realized this requirement: Course author will be able to delete them if they want. In the proof of concept the Course author cannot remove tags. The permissions will have to be modified there.

@rpenido
Copy link

rpenido commented Apr 3, 2024

The permissions will have to be modified there.

For the backend, we could create a new can_remove_tags and check it at the view level if we receive an empty tag list, instead of checking can_tag_object.

@ChrisChV
Copy link
Author

ChrisChV commented May 3, 2024

@yusuf-musleh This is my implementation plan:

  • Implement a new section in the bottom of the Tag Drawer with "Other Tags" (ref)
  • We can put collapsibles for each taxonomy without making a request for this taxonomies because the content tags has the basic data of taxonomy (name).
  • Use the same styles and components of the Drawer.
  • If the user dosen't have permission, then the taxonomy will appear in "Other Tags", otherwise will appear in normal section. So no need to make any permission changes here.
  • The collapsibles in "Other Tags" they will not have the select component to add tags.
  • Update the permission to verify if the user can remove the object tag (ref)

@yusuf-musleh @bradenmacdonald @ali-hugo @jmakowski1123 What do you think?

@ali-hugo
Copy link

ali-hugo commented May 6, 2024

@ChrisChV I decided to create two quick mock ups to make sure I'm interpreting this correctly. Please let me know whether Option 1 or Option 2 better reflects what you have in mind (and if I've captured all the details correctly).

Option 1:

Option 1
(Note: In Option 1, there is no reference to the taxonomy name)

Option 2:

Option 2

@yusuf-musleh
Copy link
Member

@ChrisChV I like the plan you mentioned and I think its a good approach.

I feel @ali-hugo 's option 2 might be more clear and less confusing for the user.

@bradenmacdonald
Copy link
Contributor

@ChrisChV Sounds good! And tahnks @ali-hugo for mocking this up.

I think this may be confusing for the user in any case, so maybe we should add a message to the Other Tags section? Something like "These tags are already applied, but their taxonomies aren't available for use so you cannot add new tags at this time."

@ChrisChV
Copy link
Author

ChrisChV commented May 7, 2024

"These tags are already applied, but their taxonomies aren't available for use so you cannot add new tags at this time."

👍 to this

@ali-hugo Thanks for the mockups. I think the second mockup is the best, but it will take longer, since I would have to place collapsibles inside the "Other tags" collapsible. I was thinking something like this:

image

  • Move "Other tags" to the left as a header like "Mange tags" (not a collapsible)
  • Move taxonomies to the the left as a normal taxonomy collapsibles.
  • Not show "Other tags" if there are no tags of that type

@ali-hugo
Copy link

ali-hugo commented May 7, 2024

@ChrisChV @bradenmacdonald Thanks! I've incorporated your feedback into the mockup below. Let me know if there's anything else you think we should change.

P.s. I tweaked @bradenmacdonald's message text slightly; I'm trying make it clearer to the user why they can't use the taxonomies. Let me know if you think it could be improved.

Other tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

5 participants