-
Notifications
You must be signed in to change notification settings - Fork 0
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
Require a community when uploading #183
Require a community when uploading #183
Comments
This issue was automatically marked as stale. |
This issue was automatically marked as stale. |
@Samk13 @tmorrell (and anyone else interested in this feature) I started looking at the changes, and I realized that the implementation is more complex than expected. Because of this, it is not easy to control the behaviour of the Is it acceptable to keep the |
Thank you for the detailed explanation @ntarocco TL;DR Regarding the implementation, here are our preferences and requirements at KTH:
Please let us know if you need any further clarification or how can we corporate on this. |
I very much agree with the error after clicking the publish button approach. We pre-fill the community via the template, so for a user to encounter the error they would have to actively go and remove the community. An error seems reasonable since it was a result of user action. We might want to document that it's recommended to set a default community when using this configuration. The other KTH requirements all sound reasonable but I think they are slightly separate from the community requirement (we don't need any of them for our use case) |
We’ve implemented the general requirement of ensuring a community is assigned for every record in a very different approach. It’s been over a year now so I can’t remember all of the technical details but it’s easy for me to show you how the UI works.
You’re welcome to play around with this UI at https://data.dev.msdlive.org/ but you’ll need to create an account and request to join a project first. I’ll get an email and approve the request if I see any come in. |
Thanks a lot for the comments and discussion: we will actively work on this in Q2, it is now in our roadmap. |
For JRC, this feature is needed for the first production release, as we should not allow people to publish out of communities. The solution proposed by Nicola, when the button Publish is still enable, but a meaningfull error message will prevent from publishing is ok. Could this still be included in V12? |
If not included in v12, it will be part of a minor release, e.g. v12.1 |
@ntarocco Great progress so far, but should we reopen this issue because the |
* The `can_create` function will now check if `RDM_COMMUNITY_REQUIRED_TO_PUBLISH` is set to True, requiring the user to have the community manager role to create new communities. * The community creator role can be overridden from the user side. * Closes inveniosoftware/product-rdm#183
* The `can_create` function will now check if `RDM_COMMUNITY_REQUIRED_TO_PUBLISH` is set to True, requiring the user to have the community manager role to create new communities. * The community creator role can be overridden from the user side. * Closes inveniosoftware/product-rdm#183
This can be achieved simply overriding the service permissions, see an example here. |
@ntarocco Thank you for your response and for pointing me to the example of overriding service permissions. User Interface Consistency: Even if we restrict permissions, users still have access to the community settings page where they can attempt to change options like flipping a community from closed to open. While the permissions will prevent the action see here, having the option visible can lead to confusion and a less streamlined user experience. Removing or conditionally displaying these options based on permissions would enhance usability. Future Maintainability: By integrating conditional code directly into the communities module, we ensure that future changes will naturally adapt to this mode. It's easy for developers to overlook instance-specific permission overrides during updates, which could lead to conflicts or security issues down the line. Embedding this logic in the core codebase makes it more robust and less error-prone. Alignment with Original Requirements: The original request emphasized the need for a distinct role controlling who can create communities, separate from the admin role. While instance-level permission overrides provide a workaround, they don't fully meet the requirement of having this role managed within the system's core functionality. Implementing this directly addresses the initial use case more effectively. I understand that this might require additional work now, but it could prevent multiple conflicts and issues in the future. Given the active development of the communities module with subcommunities etc..., incorporating this case would ensure that the system remains adaptable and secure as it evolves. I'm more than willing to assist with the necessary changes to implement this functionality. Let's work together to enhance the platform for all users. Please let me know your thoughts on this approach. |
@Samk13 there is one point that is not very clear to me:
What is the exact use case? If I can create a community, and I therefore owner, I should be able to adjust its visibility too. I checked the PR, it feels like that we are mixing the feature to submit a record without a review with the community required flag. |
@ntarocco Isn't the whole point of requiring "community on publish" to enforce a review process for each record? It looks like your GPT summary didn’t accurately capture my Copilot AI comment ;) so to clarify, I’m not talking about visibility settings here, I’m specifically suggesting that we set the "review policy" to "closed," keeping the focus on enforcing a review process. As it seems like you see the "community creator" role is currently treated as an admin, but this shouldn’t be the case. they should still follow the organization’s publish under review rule. I also invite others here to share their thoughts on this, as this feature has been requested by many other organizations not only us. |
I don't think that we should mix and merge these 2. I think that it is a realistic use case to require a community, so you are sure that community curators can curate all records in your repository. And, at the same time, allow community owners to decide if each submission requires a review or not. If your instance requires these 2 together, then we can discuss what is the best way to implement this in your instance. We should keep InvenioRDM simple, understandable. This also means keeping under control the amount of possible available configurations. I re-opened the discussion and it would be indeed nice to have other users expressing their opinions on this topic |
This may be slightly OT but I felt I may add this observation here while the issue is re-opened. Trying out the current state of development on this feature, I came to wonder if the |
@mugraph the answer to this question is up here in this conversation (already many comments :)): the short answer is that, at the moment, there is no easy way to implement this in InvenioRDM. |
Is your feature request related to a problem?
Organizations may require at least one community to be associated with a record. Currently, there is no configuration option to enforce this constraint.
Describe the solution you'd like
This issue:
closes permissions: records always in community feature invenio-rdm-records#1719
closes ui: Require records community invenio-app-rdm#2642
resolves assets: Fix modal err msg & visibility on remove invenio-app-rdm#2201
resolves widget: fix error message content react-invenio-forms#202
Describe alternatives you've considered
An alternative solution could involve implementing a more granular permission system that allows administrators to define and enforce specific rules for community association. However, this would require a more complex implementation and might introduce unnecessary complexity for most use cases.
Additional context
This feature request is related to the issue of disabling the "publish" button based on the value of a config variable and raising validation errors if the user hasn't selected a community when publishing. Implementing this configuration option will provide organizations with more flexibility in managing their records and community associations, as well as ensuring that the community managers have control over the publishing process.
This feature is related to CERNDocumentServer/cds-rdm#55
We can bring up the topic of introducing custom roles in place of granting full admin access for community creation. As community managers, we're interested in limiting their permissions to manage their respective communities only, rather than having complete control over the system. We discuss this further and explore potential solutions in separate issues when this one is merged.
The text was updated successfully, but these errors were encountered: