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

Merge Spaces Management - Meeds-io/MIPs#160 #4191

Merged
merged 24 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8bb20e5
feat: Rework Space Administration Table - MEED-7493 - Meeds-io/MIPs#1…
boubaker Nov 6, 2024
c01d17c
feat: Allow to filter by Space template in Spaces Administration - ME…
boubaker Nov 6, 2024
d163eb8
feat: Add Button to add space from Spaces Administration - MEED-7731 …
boubaker Nov 6, 2024
46b9871
feat: Add Open settings and Delete Spaces Administration Menu Items -…
boubaker Nov 6, 2024
1f60014
feat: Add Space Group Binding Administration UI - MEED-7734 - Meeds-i…
boubaker Nov 7, 2024
b8ae194
feat: Allow to change Space permission through Admin UI - MEED-7737 -…
boubaker Nov 7, 2024
39be24f
feat: Allow to apply a Template on a Space - MEED-7735 - Meeds-io/MIP…
boubaker Nov 8, 2024
84e5fe8
feat: Allow to create a Space Template Site from a Space Site - MEED-…
boubaker Nov 8, 2024
3847ceb
feat: Rework Spaces Management List columns - MEED-7761 - Meeds-io/MI…
boubaker Nov 11, 2024
615192e
feat: Rename Space Template Steps - MEED-7749 - Meeds-io/MIPs#160 (#4…
boubaker Nov 11, 2024
9cf5542
feat: Remove Mandatory Flag in Space Form inputs - MEED-7750 - Meeds-…
boubaker Nov 11, 2024
5350637
feat: Add Spaces Administrators by Template - MEED-7751 - Meeds-io/MI…
boubaker Nov 11, 2024
4e7fcba
feat: Add Spaces Selection UX in Spaces Administration - MEED-7739 - …
boubaker Nov 11, 2024
c9daa9a
feat: Allow to apply Space Template in Bulk - MEED-7768 - Meeds-io/MI…
boubaker Nov 12, 2024
f88c77e
feat: Add tooltips on icons - MEED-7748 - Meeds-io/MIPs#160
boubaker Nov 12, 2024
03f1474
feat: Add Bulk Operation for Group Binding in Spaces Admin UI - MEED-…
boubaker Nov 12, 2024
8570bb9
feat: Add Bulk Operation for Spaces Deleting in Admin UI - MEED-7770 …
boubaker Nov 12, 2024
5b1baf8
feat: Add Bulk Operation for Spaces Permissions in Admin UI - MEED-77…
boubaker Nov 12, 2024
e8590c2
feat: Include Hidden spaces for Space Template Managers when listing …
boubaker Nov 13, 2024
efad3cf
feat: Change Binding Report Access Icon - MEED-7775 - Meeds-io/MIPs#160
boubaker Nov 14, 2024
46ee27b
feat: Improve Scroll UX when processing Spaces in Bulk - MEED-7774 - …
boubaker Nov 14, 2024
6eb9336
feat: Add Visibility and Registration Filters when Listing Spaces - M…
boubaker Nov 14, 2024
04a275c
feat: Allow Space Master to edit space public site - MEED-7809 - Meed…
boubaker Nov 14, 2024
e4c6c96
fix: Fix Display Last Accessed Space - Meeds-io/MIPs#160
boubaker Nov 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
*/
package io.meeds.social.space.constant;

public enum Registration {
public enum SpaceRegistration {
OPEN, VALIDATION, CLOSED
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
*/
package io.meeds.social.space.constant;

public enum Visibility {
public enum SpaceVisibility {
PUBLIC, PRIVATE, HIDDEN
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* This file is part of the Meeds project (https://meeds.io/).
*
* Copyright (C) 2020 - 2024 Meeds Association [email protected]
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package io.meeds.social.space.model;

import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class SpacePermissions {

private List<String> layoutPermissions;

private List<String> publicSitePermissions;

private List<String> deletePermissions;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* This file is part of the Meeds project (https://meeds.io/).
*
* Copyright (C) 2020 - 2024 Meeds Association [email protected]
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package io.meeds.social.space.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class SpaceTemplatePatch {

private long templateId;

private boolean accessRules;

private boolean editorialMode;

private boolean layoutPermissions;

private boolean publicSitePermissions;

private boolean deletePermissions;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package io.meeds.social.space.service;

import org.exoplatform.commons.exception.ObjectNotFoundException;
import org.exoplatform.social.core.space.model.Space;

import io.meeds.social.space.model.SpacePermissions;
import io.meeds.social.space.model.SpaceTemplatePatch;

public interface SpaceAdministrationService {

/**
* @param spaceId {@link Space} technical id
* @return Space permissions with layoutPermissions, deletePermissions and
* publicSitePermissions
* @throws ObjectNotFoundException when the space doesn't exist
*/
SpacePermissions getSpacePermissions(long spaceId) throws ObjectNotFoundException;

/**
* @param spaceId {@link Space} technical id
* @param permissions Space permissions with layoutPermissions,
* deletePermissions and publicSitePermissions
* @throws ObjectNotFoundException when the space doesn't exist
*/
void updateSpacePermissions(long spaceId, SpacePermissions permissions) throws ObjectNotFoundException;

/**
* @param spaceId {@link Space} technical id
* @param templatePatch SpaceTemplate properties to apply
* @throws ObjectNotFoundException when the space doesn't exist
*/
void applySpaceTemplate(long spaceId, SpaceTemplatePatch templatePatch) throws ObjectNotFoundException;

}
Original file line number Diff line number Diff line change
Expand Up @@ -29,50 +29,46 @@
import org.exoplatform.social.core.space.model.Space;

import io.meeds.social.space.constant.SpaceMembershipStatus;
import io.meeds.social.space.constant.SpaceRegistration;
import io.meeds.social.space.constant.SpaceVisibility;

import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
* @author <a href="http://hoatle.net">hoatle (hoatlevan at gmail dot com)</a>
* @since 1.2.0-GA
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode
@Getter
@Setter
public class SpaceFilter implements Cloneable {

private String spaceNameSearchCondition;

private List<Space> includeSpaces;

private List<Space> exclusions;
private List<Long> excludedIds;

private String remoteId;

private long identityId;

private long templateId;

private List<Long> managingTemplateIds;

private SpaceMembershipStatus status;

private SpaceMembershipStatus extraStatus;

private SpaceRegistration registration;

private SpaceVisibility visibility;

private Sorting sorting;

private boolean favorite;

@Getter
@Setter
private List<String> tagNames;

public SpaceFilter() {
this.spaceNameSearchCondition = null;
}

public SpaceFilter(String spaceNameSearchCondition) {
this.spaceNameSearchCondition = Utils.processUnifiedSearchCondition(spaceNameSearchCondition);
}
Expand Down Expand Up @@ -102,12 +98,15 @@ public boolean isUnifiedSearch() {
public SpaceFilter clone() { // NOSONAR
return new SpaceFilter(spaceNameSearchCondition,
includeSpaces,
exclusions,
excludedIds,
remoteId,
identityId,
templateId,
managingTemplateIds,
status,
extraStatus,
registration,
visibility,
sorting,
favorite,
tagNames == null ? null : new ArrayList<>(tagNames));
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public class Space implements CacheEntry {
public static final String HOME_URL = "home";

/** The id. */
private String id;
private long id;

/** The display name. */
private String displayName;
Expand Down Expand Up @@ -235,6 +235,10 @@ public void setField(UpdatedField field) {
* @param id the new id
*/
public void setId(String id) {
this.id = id == null ? 0 : Long.parseLong(id);
}

public void setId(long id) {
this.id = id;
}

Expand All @@ -244,6 +248,10 @@ public void setId(String id) {
* @return the id
*/
public String getId() {
return String.valueOf(id);
}

public long getSpaceId() {
return id;
}

Expand Down Expand Up @@ -653,26 +661,15 @@ public void setCreatedTime(Long createdTime) {

@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
return result;
return Long.hashCode(id);
}

@Override
public boolean equals(Object obj) {
if (this == obj)
public boolean equals(Object o) {
if (this == o) {
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Space other = (Space) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
return true;
}
return o instanceof Space space && id == space.id;
}

}
Loading