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

views: Conditional New Community btn visibility #1070

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

Samk13
Copy link
Member

@Samk13 Samk13 commented Nov 15, 2023

❤️ Thank you for your contribution!

Description

This update introduces a configurable option to control the visibility of the 'New Community' menu button in InvenioRDM based on user permissions and application configuration. When the corresponding configuration (COMMUNITIES_CREATE_PERM_CHECK) is set to false, the 'New Community' button is always visible to users. If set to true, the system checks whether the user has the necessary permission to create a community before displaying the button. This feature enhances administrative control and personalizes the user interface according to user roles and permissions.

Note: This functionality was previously enabled but encountered issues in Zenodo, leading to its temporary disablement.

Checklist

Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

Third-party code

If you've added third-party code (copy/pasted or new dependencies), please reach out to an architect.

Reminder

By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

  1. You license your contribution under the same terms as the current repository’s license.
  2. You agree that you have the right to license your contribution under the current repository’s license.

Copy link
Contributor

@ntarocco ntarocco left a comment

Choose a reason for hiding this comment

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

Thanks a lot for your PR. I have added a small comment.

invenio_communities/views/ui.py Outdated Show resolved Hide resolved
@slint slint merged commit c8104bf into inveniosoftware:master Nov 27, 2023
4 checks passed
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.

3 participants