diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..0f4a4c2 --- /dev/null +++ b/.classpath @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..30277ae --- /dev/null +++ b/.project @@ -0,0 +1,38 @@ + + + RemoveAccount + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + com.liferay.ide.core.liferayNature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/.settings/.jsdtscope b/.settings/.jsdtscope new file mode 100644 index 0000000..f179e11 --- /dev/null +++ b/.settings/.jsdtscope @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..abdea9a --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding/=UTF-8 diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..69c31cd --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/.settings/org.eclipse.jst.jsp.core.prefs b/.settings/org.eclipse.jst.jsp.core.prefs new file mode 100644 index 0000000..3a5c98d --- /dev/null +++ b/.settings/org.eclipse.jst.jsp.core.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +validateFragments=false +validation.use-project-settings=true diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..e6f7678 --- /dev/null +++ b/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles=Liferay-v6.2-CE-(Tomcat-7)-(2) +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component new file mode 100644 index 0000000..965f84c --- /dev/null +++ b/.settings/org.eclipse.wst.common.component @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 0000000..594f2d0 --- /dev/null +++ b/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.container b/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.name b/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/.settings/org.eclipse.wst.validation.prefs b/.settings/org.eclipse.wst.validation.prefs new file mode 100644 index 0000000..04cad8c --- /dev/null +++ b/.settings/org.eclipse.wst.validation.prefs @@ -0,0 +1,2 @@ +disabled=06target +eclipse.preferences.version=1 diff --git a/.tern-project b/.tern-project new file mode 100644 index 0000000..d7fbf24 --- /dev/null +++ b/.tern-project @@ -0,0 +1,23 @@ +{ + "plugins": { + "guess-types": { + + }, + "outline": { + + }, + "liferay": { + + }, + "yui3": { + + }, + "aui2.0.x": { + + } + }, + "libs": [ + "ecma5", + "browser" + ] +} \ No newline at end of file diff --git a/distro/LICENSE b/distro/LICENSE new file mode 100644 index 0000000..2d9616a --- /dev/null +++ b/distro/LICENSE @@ -0,0 +1 @@ +${gcube.license} \ No newline at end of file diff --git a/distro/README b/distro/README new file mode 100644 index 0000000..b13a32d --- /dev/null +++ b/distro/README @@ -0,0 +1,62 @@ +The gCube System - ${name} +-------------------------------------------------- + +${description} + + +${gcube.description} + +${gcube.funding} + + +Version +-------------------------------------------------- + +${version} (${buildDate}) + +Please see the file named "changelog.xml" in this directory for the release notes. + + +Authors +-------------------------------------------------- + +* Massimiliano Assante (massimiliano.assante@isti.cnr.it), Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo" - CNR, Pisa (Italy). + +Maintainers +----------- + +* Massimiliano Assante (massimiliano.assante@isti.cnr.it), Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo" - CNR, Pisa (Italy). + +Download information +-------------------------------------------------- + +Source code is available from SVN: + ${scm.url} + +Binaries can be downloaded from the gCube website: + ${gcube.website} + + +Installation +-------------------------------------------------- + +Installation documentation is available on-line in the gCube Wiki: + ${gcube.wikiRoot} + +Documentation +-------------------------------------------------- + +Documentation is available on-line in the gCube Wiki: + ${gcube.wikiRoot} + +Support +-------------------------------------------------- + +Bugs and support requests can be reported in the gCube issue tracking tool: + ${gcube.issueTracking} + + +Licensing +-------------------------------------------------- + +This software is licensed under the terms you may find in the file named "LICENSE" in this directory. \ No newline at end of file diff --git a/distro/changelog.xml b/distro/changelog.xml new file mode 100644 index 0000000..c9db45c --- /dev/null +++ b/distro/changelog.xml @@ -0,0 +1,7 @@ + + + First release + + + diff --git a/distro/descriptor.xml b/distro/descriptor.xml new file mode 100644 index 0000000..b3f5628 --- /dev/null +++ b/distro/descriptor.xml @@ -0,0 +1,31 @@ + + servicearchive + + tar.gz + + / + + + ${distroDirectory} + / + true + + README + LICENSE + changelog.xml + profile.xml + + 755 + true + + + + + target/${build.finalName}.${project.packaging} + /${artifactId} + + + \ No newline at end of file diff --git a/distro/profile.xml b/distro/profile.xml new file mode 100644 index 0000000..20d1d1b --- /dev/null +++ b/distro/profile.xml @@ -0,0 +1,25 @@ + + + + Service + + Remove Account portlet + PortletAdmin + ${artifactId} + ${version} + + + ${artifactId} + ${version} + + ${groupId} + ${artifactId} + ${version} + + + target/${build.finalName}.war + + + + + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..938f2dd --- /dev/null +++ b/pom.xml @@ -0,0 +1,146 @@ + + + + 4.0.0 + + maven-parent + org.gcube.tools + 1.0.0 + + + org.gcube.portlets.admin + remove-account-portlet + war + RemoveAccount Portlet + 1.0.0-SNAPSHOT + + + + com.liferay.maven.plugins + liferay-maven-plugin + ${liferay.maven.plugin.version} + + + generate-sources + + build-css + + + + + ${liferay.auto.deploy.dir} + ${liferay.app.server.deploy.dir} + ${liferay.app.server.lib.global.dir} + ${liferay.app.server.portal.dir} + ${liferay.version} + portlet + + + + maven-compiler-plugin + 2.5 + + UTF-8 + 1.6 + 1.6 + + + + maven-resources-plugin + 2.5 + + UTF-8 + + + + + + + + org.gcube.distribution + maven-portal-bom + LATEST + pom + import + + + + + + org.gcube.portal + notifications-common-library + provided + + + org.gcube.dvos + usermanagement-core + provided + + + org.gcube.common.portal + portal-manager + provided + + + com.sun.mail + javax.mail + provided + + + com.liferay.portal + portal-service + ${liferay.version} + provided + + + com.liferay.portal + util-bridges + ${liferay.version} + provided + + + com.liferay.portal + util-taglib + ${liferay.version} + provided + + + com.liferay.portal + util-java + ${liferay.version} + provided + + + javax.portlet + portlet-api + 2.0 + provided + + + javax.servlet + servlet-api + 2.4 + provided + + + javax.servlet.jsp + jsp-api + 2.0 + provided + + + + + Liferay-v6.2-CE-(Tomcat-7)-(2) + + 6.2.5 + 6.2.5 + /Users/massi/portal/liferay-portal-6.2-ce-ga6/deploy + /Users/massi/portal/liferay-portal-6.2-ce-ga6/tomcat-7.0.62/webapps + /Users/massi/portal/liferay-portal-6.2-ce-ga6/tomcat-7.0.62/lib/ext + /Users/massi/portal/liferay-portal-6.2-ce-ga6/tomcat-7.0.62/webapps/ROOT + + + + \ No newline at end of file diff --git a/src/main/java/org/gcube/portlets/admin/RemoveAccountPortlet.java b/src/main/java/org/gcube/portlets/admin/RemoveAccountPortlet.java new file mode 100644 index 0000000..d03ef46 --- /dev/null +++ b/src/main/java/org/gcube/portlets/admin/RemoveAccountPortlet.java @@ -0,0 +1,42 @@ +package org.gcube.portlets.admin; + +import java.io.IOException; + +import javax.portlet.ActionRequest; +import javax.portlet.ActionResponse; +import javax.portlet.PortletException; +import javax.portlet.ProcessAction; + +import com.liferay.portal.kernel.util.WebKeys; +import com.liferay.portal.model.User; +import com.liferay.portal.theme.ThemeDisplay; +import com.liferay.portal.util.PortalUtil; +import com.liferay.util.bridges.mvc.MVCPortlet; + +/** + * Portlet implementation class RemoveAccountPortlet + */ +public class RemoveAccountPortlet extends MVCPortlet { + + @ProcessAction(name = "deleteAccount") + public void deleteAccount(ActionRequest actionRequest, + ActionResponse response) throws IOException, PortletException { + User user = null; + try { + user = PortalUtil.getUser(actionRequest); + } catch (Exception e) { + e.printStackTrace(); + } + + Thread emailManagersThread = new Thread(new RemovedUserAccountThread( + user.getUserId(), + user.getScreenName(), + user.getFullName(), + user.getEmailAddress())); + emailManagersThread.start(); + + ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute(WebKeys.THEME_DISPLAY); + response.sendRedirect(themeDisplay.getURLSignOut()); + + } +} diff --git a/src/main/java/org/gcube/portlets/admin/RemovedUserAccountThread.java b/src/main/java/org/gcube/portlets/admin/RemovedUserAccountThread.java new file mode 100644 index 0000000..2f64e18 --- /dev/null +++ b/src/main/java/org/gcube/portlets/admin/RemovedUserAccountThread.java @@ -0,0 +1,119 @@ +package org.gcube.portlets.admin; + +import java.util.List; + +import org.gcube.common.portal.PortalContext; +import org.gcube.common.portal.mailing.EmailNotification; +import org.gcube.vomanagement.usermanagement.GroupManager; +import org.gcube.vomanagement.usermanagement.RoleManager; +import org.gcube.vomanagement.usermanagement.UserManager; +import org.gcube.vomanagement.usermanagement.exception.RoleRetrievalFault; +import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager; +import org.gcube.vomanagement.usermanagement.impl.LiferayRoleManager; +import org.gcube.vomanagement.usermanagement.impl.LiferayUserManager; +import org.gcube.vomanagement.usermanagement.model.GCubeUser; +import org.gcube.vomanagement.usermanagement.model.GatewayRolesNames; + +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.service.UserLocalServiceUtil; + + +/** + * + * @author Massimiliano Assante ISTI-CNR + * + */ +public class RemovedUserAccountThread implements Runnable { + private static Log _log = LogFactoryUtil.getLog(RemovedUserAccountThread.class); + + final String SUBJECT = "User account REMOVAL notification"; + + private String userName; + private String fullName; + private String emailAddress; + private long userId; + + public RemovedUserAccountThread(long userId,String userName, String fullName, String emailAddress) { + super(); + this.userId = userId; + this.userName = userName; + this.fullName = fullName; + this.emailAddress = emailAddress; + } + + @Override + public void run() { + handleUserRemoval(userId, userName, fullName, emailAddress); + } + + private void handleUserRemoval(long userId, String userName, String fullName, String emailAddress) { + System.out.println("trying removeUser account for " + userName); + //first remove the account + try { + UserLocalServiceUtil.deleteUser(userId); + } catch (Exception e) { + e.printStackTrace(); + } + System.out.println("removeUser account for " + userName + " done with success, now notify the managers ... "); + //the notify the managers + UserManager um = new LiferayUserManager(); + GroupManager gm = new LiferayGroupManager(); + RoleManager rm = new LiferayRoleManager(); + try { + String rootVoName = PortalContext.getConfiguration().getInfrastructureName(); + long groupId = gm.getGroupIdFromInfrastructureScope("/"+rootVoName); + long infraManagerRoleId = -1; + try { + infraManagerRoleId = rm.getRoleIdByName(GatewayRolesNames.INFRASTRUCTURE_MANAGER.getRoleName()); + } + catch (RoleRetrievalFault e) { + _log.warn("There is no (Site) Role " + infraManagerRoleId + " in this portal. Will not notify about removed user accounts."); + return; + } + _log.trace("Root is: " + rootVoName + " Scanning roles ...."); + + List managers = um.listUsersByGroupAndRole(groupId, infraManagerRoleId); + if (managers == null || managers.isEmpty()) { + _log.warn("There are no users with (Site) Role " + infraManagerRoleId + " on " + rootVoName + " in this portal. Will not notify about removed user accounts."); + } + else { + for (GCubeUser manager : managers) { + sendNotification(manager, userName, fullName, emailAddress); + _log.info("sent email to manager: " + manager.getEmail()); + } + } + + } catch (Exception e) { + e.printStackTrace(); + } + } + + private void sendNotification(GCubeUser manager, String newUserUserName, String newUserFullName, String newUserEmailAddress) { + EmailNotification toSend = new EmailNotification(manager.getEmail(), SUBJECT, + getHTMLEmail(manager.getFirstName(), newUserUserName, newUserFullName, newUserEmailAddress), null); + toSend.sendEmail(); + } + + private static String getHTMLEmail(String userFirstName, String newUserUserName, String newUserFullName, String newUserEmailAddress) { + String sender = newUserFullName + " ("+newUserUserName+") "; + + StringBuilder body = new StringBuilder(); + + body.append("
") + .append("
") + .append("Dear ").append(userFirstName).append(",") //dear + .append("

").append(sender).append(" ").append("removed his/her account from the portal with the following email: ") // has done something + .append(newUserEmailAddress) + .append("


") + .append("

You received this email because you are an Infrastructure Manager in this portal

") + .append("

") + .append(""); + + return body.toString(); + + } + + + +} diff --git a/src/main/webapp/WEB-INF/liferay-display.xml b/src/main/webapp/WEB-INF/liferay-display.xml new file mode 100644 index 0000000..f448a2e --- /dev/null +++ b/src/main/webapp/WEB-INF/liferay-display.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/liferay-plugin-package.properties b/src/main/webapp/WEB-INF/liferay-plugin-package.properties new file mode 100644 index 0000000..c0a6ab8 --- /dev/null +++ b/src/main/webapp/WEB-INF/liferay-plugin-package.properties @@ -0,0 +1,9 @@ +name=RemoveAccount +module-group-id=liferay +module-incremental-version=1 +tags= +short-description= +change-log= +page-url=http://www.gcube-system.org +author=M. Assante +licenses=EUPL \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/liferay-portlet.xml b/src/main/webapp/WEB-INF/liferay-portlet.xml new file mode 100644 index 0000000..c834a38 --- /dev/null +++ b/src/main/webapp/WEB-INF/liferay-portlet.xml @@ -0,0 +1,34 @@ + + + + + + remove-account + /icon.png + my + 10 + com.liferay.portlet.LiberalControlPanelEntry + /css/main.css + + /js/main.js + + remove-account-portlet + true + + + administrator + Administrator + + + guest + Guest + + + power-user + Power User + + + user + User + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/portlet.xml b/src/main/webapp/WEB-INF/portlet.xml new file mode 100644 index 0000000..a47c304 --- /dev/null +++ b/src/main/webapp/WEB-INF/portlet.xml @@ -0,0 +1,67 @@ + + + + + RemoveAccount + RemoveAccount + com.liferay.util.bridges.mvc.MVCPortlet + + view-template + /view.jsp + + 0 + + text/html + + + RemoveAccount + RemoveAccount + RemoveAccount + + + administrator + + + guest + + + power-user + + + user + + + + remove-account + Remove Account + + org.gcube.portlets.admin.RemoveAccountPortlet + + + view-template + /html/removeaccount/view.jsp + + 0 + + text/html + view + + + Delete Account + Delete Account + + + + administrator + + + guest + + + power-user + + + user + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..7d8c082 --- /dev/null +++ b/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/main/webapp/css/main.css b/src/main/webapp/css/main.css new file mode 100644 index 0000000..e69de29 diff --git a/src/main/webapp/html/removeaccount/view.jsp b/src/main/webapp/html/removeaccount/view.jsp new file mode 100644 index 0000000..7b57e04 --- /dev/null +++ b/src/main/webapp/html/removeaccount/view.jsp @@ -0,0 +1,24 @@ +<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%> + + + + + + +

Delete your Account

+

Deleting your account will disable your profile and remove your + name and photo from most things you've shared on this D4Science gateway.

+

Some information may still be visible to others, such as your + name in the posts and private messages you sent. Non shared files and folders of your virtual workspace will be removed.

+ +
+

Warning

+ Clicking on "Confirm delete account" below is an undoable operation, your account will be removed and you'll be automatically logged out from this Gateway. +
+ +
+ +
\ No newline at end of file diff --git a/src/main/webapp/icon.png b/src/main/webapp/icon.png new file mode 100644 index 0000000..807b862 Binary files /dev/null and b/src/main/webapp/icon.png differ diff --git a/src/main/webapp/js/main.js b/src/main/webapp/js/main.js new file mode 100644 index 0000000..e69de29 diff --git a/src/main/webapp/view.jsp b/src/main/webapp/view.jsp new file mode 100644 index 0000000..8671525 --- /dev/null +++ b/src/main/webapp/view.jsp @@ -0,0 +1,21 @@ +<%-- +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library 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 2.1 of the License, or (at your option) + * any later version. + * + * This library 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. + */ +--%> + +<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> + + + +This is the RemoveAccount. \ No newline at end of file diff --git a/target/maven-archiver/pom.properties b/target/maven-archiver/pom.properties new file mode 100644 index 0000000..44f4580 --- /dev/null +++ b/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Mon Nov 27 16:23:54 CET 2017 +version=1.0.0-SNAPSHOT +groupId=org.gcube.portlets.admin +artifactId=remove-account-portlet diff --git a/target/remove-account-portlet-1.0.0-SNAPSHOT.war b/target/remove-account-portlet-1.0.0-SNAPSHOT.war new file mode 100644 index 0000000..99dac27 Binary files /dev/null and b/target/remove-account-portlet-1.0.0-SNAPSHOT.war differ diff --git a/target/remove-account-portlet-1.0.0-SNAPSHOT/WEB-INF/classes/org/gcube/portlets/admin/RemoveAccountPortlet.class b/target/remove-account-portlet-1.0.0-SNAPSHOT/WEB-INF/classes/org/gcube/portlets/admin/RemoveAccountPortlet.class new file mode 100644 index 0000000..044cd56 Binary files /dev/null and b/target/remove-account-portlet-1.0.0-SNAPSHOT/WEB-INF/classes/org/gcube/portlets/admin/RemoveAccountPortlet.class differ diff --git a/target/remove-account-portlet-1.0.0-SNAPSHOT/WEB-INF/classes/org/gcube/portlets/admin/RemovedUserAccountThread.class b/target/remove-account-portlet-1.0.0-SNAPSHOT/WEB-INF/classes/org/gcube/portlets/admin/RemovedUserAccountThread.class new file mode 100644 index 0000000..2683f62 Binary files /dev/null and b/target/remove-account-portlet-1.0.0-SNAPSHOT/WEB-INF/classes/org/gcube/portlets/admin/RemovedUserAccountThread.class differ diff --git a/target/remove-account-portlet-1.0.0-SNAPSHOT/WEB-INF/liferay-display.xml b/target/remove-account-portlet-1.0.0-SNAPSHOT/WEB-INF/liferay-display.xml new file mode 100644 index 0000000..f448a2e --- /dev/null +++ b/target/remove-account-portlet-1.0.0-SNAPSHOT/WEB-INF/liferay-display.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/target/remove-account-portlet-1.0.0-SNAPSHOT/WEB-INF/liferay-plugin-package.properties b/target/remove-account-portlet-1.0.0-SNAPSHOT/WEB-INF/liferay-plugin-package.properties new file mode 100644 index 0000000..c0a6ab8 --- /dev/null +++ b/target/remove-account-portlet-1.0.0-SNAPSHOT/WEB-INF/liferay-plugin-package.properties @@ -0,0 +1,9 @@ +name=RemoveAccount +module-group-id=liferay +module-incremental-version=1 +tags= +short-description= +change-log= +page-url=http://www.gcube-system.org +author=M. Assante +licenses=EUPL \ No newline at end of file diff --git a/target/remove-account-portlet-1.0.0-SNAPSHOT/WEB-INF/liferay-portlet.xml b/target/remove-account-portlet-1.0.0-SNAPSHOT/WEB-INF/liferay-portlet.xml new file mode 100644 index 0000000..c834a38 --- /dev/null +++ b/target/remove-account-portlet-1.0.0-SNAPSHOT/WEB-INF/liferay-portlet.xml @@ -0,0 +1,34 @@ + + + + + + remove-account + /icon.png + my + 10 + com.liferay.portlet.LiberalControlPanelEntry + /css/main.css + + /js/main.js + + remove-account-portlet + true + + + administrator + Administrator + + + guest + Guest + + + power-user + Power User + + + user + User + + \ No newline at end of file diff --git a/target/remove-account-portlet-1.0.0-SNAPSHOT/WEB-INF/portlet.xml b/target/remove-account-portlet-1.0.0-SNAPSHOT/WEB-INF/portlet.xml new file mode 100644 index 0000000..a47c304 --- /dev/null +++ b/target/remove-account-portlet-1.0.0-SNAPSHOT/WEB-INF/portlet.xml @@ -0,0 +1,67 @@ + + + + + RemoveAccount + RemoveAccount + com.liferay.util.bridges.mvc.MVCPortlet + + view-template + /view.jsp + + 0 + + text/html + + + RemoveAccount + RemoveAccount + RemoveAccount + + + administrator + + + guest + + + power-user + + + user + + + + remove-account + Remove Account + + org.gcube.portlets.admin.RemoveAccountPortlet + + + view-template + /html/removeaccount/view.jsp + + 0 + + text/html + view + + + Delete Account + Delete Account + + + + administrator + + + guest + + + power-user + + + user + + + \ No newline at end of file diff --git a/target/remove-account-portlet-1.0.0-SNAPSHOT/WEB-INF/web.xml b/target/remove-account-portlet-1.0.0-SNAPSHOT/WEB-INF/web.xml new file mode 100644 index 0000000..7d8c082 --- /dev/null +++ b/target/remove-account-portlet-1.0.0-SNAPSHOT/WEB-INF/web.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/target/remove-account-portlet-1.0.0-SNAPSHOT/css/.sass-cache/main.css b/target/remove-account-portlet-1.0.0-SNAPSHOT/css/.sass-cache/main.css new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/target/remove-account-portlet-1.0.0-SNAPSHOT/css/.sass-cache/main.css @@ -0,0 +1 @@ + diff --git a/target/remove-account-portlet-1.0.0-SNAPSHOT/css/.sass-cache/main_rtl.css b/target/remove-account-portlet-1.0.0-SNAPSHOT/css/.sass-cache/main_rtl.css new file mode 100644 index 0000000..e69de29 diff --git a/target/remove-account-portlet-1.0.0-SNAPSHOT/css/main.css b/target/remove-account-portlet-1.0.0-SNAPSHOT/css/main.css new file mode 100644 index 0000000..e69de29 diff --git a/target/remove-account-portlet-1.0.0-SNAPSHOT/html/removeaccount/view.jsp b/target/remove-account-portlet-1.0.0-SNAPSHOT/html/removeaccount/view.jsp new file mode 100644 index 0000000..7b57e04 --- /dev/null +++ b/target/remove-account-portlet-1.0.0-SNAPSHOT/html/removeaccount/view.jsp @@ -0,0 +1,24 @@ +<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%> + + + + + + +

Delete your Account

+

Deleting your account will disable your profile and remove your + name and photo from most things you've shared on this D4Science gateway.

+

Some information may still be visible to others, such as your + name in the posts and private messages you sent. Non shared files and folders of your virtual workspace will be removed.

+ +
+

Warning

+ Clicking on "Confirm delete account" below is an undoable operation, your account will be removed and you'll be automatically logged out from this Gateway. +
+ +
+ +
\ No newline at end of file diff --git a/target/remove-account-portlet-1.0.0-SNAPSHOT/icon.png b/target/remove-account-portlet-1.0.0-SNAPSHOT/icon.png new file mode 100644 index 0000000..807b862 Binary files /dev/null and b/target/remove-account-portlet-1.0.0-SNAPSHOT/icon.png differ diff --git a/target/remove-account-portlet-1.0.0-SNAPSHOT/js/main.js b/target/remove-account-portlet-1.0.0-SNAPSHOT/js/main.js new file mode 100644 index 0000000..e69de29 diff --git a/target/remove-account-portlet-1.0.0-SNAPSHOT/view.jsp b/target/remove-account-portlet-1.0.0-SNAPSHOT/view.jsp new file mode 100644 index 0000000..8671525 --- /dev/null +++ b/target/remove-account-portlet-1.0.0-SNAPSHOT/view.jsp @@ -0,0 +1,21 @@ +<%-- +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library 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 2.1 of the License, or (at your option) + * any later version. + * + * This library 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. + */ +--%> + +<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> + + + +This is the RemoveAccount. \ No newline at end of file