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

#3404: Added Configuration settings for comment visibility. #3405

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gmurtaza00
Copy link
Contributor

Added a configuration setting that allows for the customization of the visibility of comments made by admins, reviewers, and partners. This feature provides flexibility and allows for easy modification without the need to manually adjust settings in the models.

Recently, ARDC required the removal of partner from comment visibility, which was easily accomplished by updating the new setting.

Settings to consider:

  • COMMENT_VISIBILITY_ADMIN
  • COMMENT_VISIBILITY_REVIEWER
  • COMMENT_VISIBILITY_PARTNER

Closes #3404

@gmurtaza00 gmurtaza00 requested review from frjo and theskumar May 12, 2023 20:21
@gmurtaza00 gmurtaza00 self-assigned this May 12, 2023
@@ -136,11 +136,11 @@ def __str__(self):
@classmethod
def visibility_for(cls, user):
if user.is_apply_staff:
return [APPLICANT, TEAM, REVIEWER, PARTNER, ALL]
return getattr(settings, "COMMENT_VISIBILITY_ADMIN", [])
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we not use return settings.COMMENT_VISIBILITY_ADMIN etc. here? It will always be set since it is in base.py.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also prefer COMMENT_VISIBILITY_STAFF instead of COMMENT_VISIBILITY_ADMIN.

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

Successfully merging this pull request may close these issues.

Configure comment visibility for admin, reviewer and partner
2 participants