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

[FC-0049] feat: Update permissions to remove object tags #188

Conversation

ChrisChV
Copy link
Contributor

@ChrisChV ChrisChV commented May 7, 2024

Description

This updates rules to add can_remove_object_tag_objectid to Objet tag views

Supporting information

Testing instructions

@openedx-webhooks
Copy link

Thanks for the pull request, @ChrisChV! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label May 7, 2024
@ChrisChV ChrisChV changed the title feat: Update permissions to remove object tags [FC-0049] feat: Update permissions to remove object tags May 7, 2024
* chore: Bump version

* fix: Issue with remove object tag permission

This rule could be defined in other apps for proper permission checking.
"""
return True
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move this down below can_change_object_tag_objectid ? Also the default value shouldn't be True - the default value should be the same as can_change_object_tag_objectid, so just call that function and return the same value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bradenmacdonald Updated here bf49f69

@@ -874,7 +874,8 @@ def test_retrieve_object_tags_query_count(self):
Test how many queries are used when retrieving object tags and permissions
"""
expected_perm = True
object_id, sort_test_applied_result = self.prepare_for_sort_test(expected_perm)
expoected_remove_perm = False
object_id, sort_test_applied_result = self.prepare_for_sort_test(expoected_remove_perm)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor typo: expoected_remove_perm

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed: 0df63a1

@bradenmacdonald bradenmacdonald merged commit 0f8cf60 into openedx:main May 8, 2024
12 checks passed
@openedx-webhooks
Copy link

@ChrisChV 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

@bradenmacdonald bradenmacdonald deleted the chris/FAL-3720-permissions-to-remove-object-tag branch May 8, 2024 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants