There is 1 update, 2 comments.
 
 
XWiki Platform / cid:jira-generated-image-avatar-62420dec-d966-454f-8732-9fd7c945590f XWIKI-78 Reopened

Refactor the Group module

 
View issue   ยท   Add comment
 

1 update

 
cid:jira-generated-image-avatar-bfe75694-0a0c-4932-9540-38849fd4a2d3 Changes by Vincent Massol on 29/Jan/26 10:56
 
Attachment: empty-groups.png
 
 

2 comments

 
cid:jira-generated-image-avatar-bfe75694-0a0c-4932-9540-38849fd4a2d3 Vincent Massol on 29/Jan/26 10:56
 

To be clear:

1. A page is defined as a group page, when it has at least one object of xclass XWiki.XWikiGroups
1. Thus when we create a group, it's empty and has 1 xobject of xclass XWiki.XWikiGroups (with no user defined)
1. Empty groups are displayed on /xwiki/bin/view/XWiki/XWikiGroups

I think what Sergiu meant is that we would need 2 xclasses:

  • one for identifying a page as a Group
  • another one to list members of the group

This would allow having a group without any user and would also fix the issue that we still have: when a user is added to a group a new XWiki.XWikiGroups xobject is added instead of replacing the existing empty XWiki.XWikiGroups.

OTOH, we could also leave it as it is now (as it may be hard to fix for backward-compatible reasons), and simply make sure that when we add the 1st user, we reuse the existing empty XWiki.XWikiGroups xobject instead of adding a new one. That looks simple enough but the downside is that the /xwiki/bin/view/XWiki/XWikiGroups UI would still indicate (Object count = 1 for empty groups):

_thumb_44544.png

But that could be fixed too by excluding empty xobjects from the count.

WDYT?

 
cid:jira-generated-image-avatar-bfe75694-0a0c-4932-9540-38849fd4a2d3 Vincent Massol on 29/Jan/26 10:56
 
To be clear:

1. # A page is defined as a group page, when it has at least one object of xclass {{XWiki.XWikiGroups}}
1. # Thus when we create a group, it's empty and has 1 xobject of xclass {{XWiki.XWikiGroups}} (with no user defined)
1. # Empty groups are displayed on /xwiki/bin/view/XWiki/XWikiGroups

I think what Sergiu meant is that we would need 2 xclasses:
* one for identifying a page as a Group
* another one to list members of the group

This would allow having a group without any user and would also fix the issue that we still have: when a user is added to a group a new {{XWiki.XWikiGroups}} xobject is added instead of replacing the existing empty  {{XWiki.XWikiGroups}}.

OTOH, we could also leave it as it is now (as it may be hard to fix for backward-compatible reasons), and simply make sure that when we add the 1st user, we reuse the existing empty {{XWiki.XWikiGroups}} xobject instead of adding a new one. That looks simple enough but the downside is that the /xwiki/bin/view/XWiki/XWikiGroups UI would still indicate (Object count = 1 for empty groups):

!empty-groups.png|thumbnail!

But that could be fixed too by excluding empty xobjects from the count.

WDYT?