feat: adds collection CRUD ui#1347
Conversation
521b121 to
2bede92
Compare
kpsherva
left a comment
There was a problem hiding this comment.
I am wondering, and it would be nice to hear from the others too. Shouldn't the UI implementation be in invenio communities as well?
2bede92 to
0983348
Compare
|
I remember talking with @slint about this some time ago, and they (Zenodo) would like the ability to hide the collection management from the interface because they don't want any community owner to be able add collections to Zenodo. It might be worth checking if this is still the case. |
a59ca20 to
f4839d6
Compare
I doubt that it is entirely true. Can't we have a "manage collections" permission, that will hide/show/control the mgnt part of the community's collection? An instance can override the default, and implement its own. |
74da0fe to
bfcd1ac
Compare
| invenio-administration>=5.0.0,<6.0.0 | ||
| invenio-vocabularies>=9.0.0,<10.0.0 | ||
| invenio-administration>=4.0.0,<5.0.0 | ||
| invenio-collections>=3.0.0,<4.0.0 |
There was a problem hiding this comment.
This is still being discussed.
00ffe12 to
8f73999
Compare
8f73999 to
65c6eab
Compare
| or current_app.config["COMMUNITIES_DEFAULT_RECORD_SUBMISSION_POLICY"] | ||
| ) | ||
| self.review_policy = review_policy or ReviewPolicyEnum.CLOSED | ||
| self.collections_enabled = ( |
There was a problem hiding this comment.
why do we need to know in the community access if the collections are enabled?
There was a problem hiding this comment.
Right, good point, is not anymore needed, was meant to enable the collections management per community, but I guess we can simply rely on the permission levels and let the owners (or whoever is granted access) to manage itself. Will remove this.
| can_read = [AnyUser(), SystemProcess()] | ||
|
|
||
|
|
||
| can_manage_collections = [CommunityOwners(), SystemProcess()] |
There was a problem hiding this comment.
to be discussed: only owners, not maangers?
There was a problem hiding this comment.
I think this complicates things slightly and I am not sure if I understand what is the use case for having granular rights on the collection of the community.
my understanding is:
- if someone
can_readthe community and it's records, they should be able to also see the collections created on the community. Why would we hide from anyone a list of available search queries or how we group content? can_manage_collections, I would rather place it in the CommunityPermissionPolicy, because if there is no community, there is no collections to manage. If we are aiming to restrict the collections management to some role then the policy should go to the invenio-collections module and should not be dependent on the community at all. ping @slint for input.
In addition I think community managers should also be able to manage collections.
if you remove this policy class, you can also remove the config variable and additional reading prefix in ext.py
There was a problem hiding this comment.
Some quick thoughts:
- agree on having managers also be able to manage collections (it's in the name anyways :) )
- regarding placement, given that at some point there will be support for global collections (or other types, as folks requested) having a dedicated section for "permissions for community collections", would probably make sense... Having this on the community permission class would be most "fitting" now, similar to how we have
can_manage_files, etc. on record permsisions
There was a problem hiding this comment.
to summarise:
- we should have
can_manage_collectionsin CommunityPermissions (can_read is not needed) which includes alsoCanManage()generator - remove CollectionsPermissionPolicy completely
- remove the reading of prefix "COLLECTIONS" in the ext.py
There was a problem hiding this comment.
We could do all that but we wouls still need to set COLLECTIONS_PERMISSION_POLICY to - in this case - CommunityPermissions. If we want to remove the reading of the prefix "COLLECTIONS" that would mean that we need to wire this up in invenio-app-rdm, the downside is that anyone using invenio-communities with collections outside rdm would need to configure that as well. Please confirm this change and I will go ahead, thanks!
* closes CERNDocumentServer/cds-rdm#632 Co-Authored-By: egabancho <me@egabancho.com>
* Add DB flag to enable/disable collection managment * closes CERNDocumentServer/cds-rdm#632
* UI moved to invenio-collections
…ace_id in generators
254c5ee to
2c6f771
Compare
2c6f771 to
a07bdc4
Compare
4603691 to
6e0a0a5
Compare
Grabacion.de.pantalla.2026-01-28.a.las.15.mp4