[JBoss JIRA] (GTNPORTAL-3286) CLONE - it shouldn't clear the configs info after first import
by Tran Trung Thanh (JIRA)
Tran Trung Thanh created GTNPORTAL-3286:
-------------------------------------------
Summary: CLONE - it shouldn't clear the configs info after first import
Key: GTNPORTAL-3286
URL: https://issues.jboss.org/browse/GTNPORTAL-3286
Project: GateIn Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 3.5.5.Final, 3.6.1.Final
Reporter: Tran Trung Thanh
Assignee: Trong Tran
Fix For: 3.7.0.Final
Currently we have a flag persisted in DB to determine whether it triggers the data import or not.
So we don't need to clear the configs anymore as it raises an issue in the case of we want to force re-importing at rumtime.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (GTNPORTAL-3285) Logic of deleting user is not proper
by Tuyen Nguyen The (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-3285?page=com.atlassian.jira.pl... ]
Tuyen Nguyen The updated GTNPORTAL-3285:
----------------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/gatein/gatein-portal/pull/684
> Logic of deleting user is not proper
> ------------------------------------
>
> Key: GTNPORTAL-3285
> URL: https://issues.jboss.org/browse/GTNPORTAL-3285
> Project: GateIn Portal
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Reporter: Tuyen Nguyen The
> Assignee: Tuyen Nguyen The
>
> I try to add a listener to not allow delete Platform users. for example:
> {code}
> public class IntranetUserEventListenerImpl extends UserEventListener {
> @Override
> public void preDelete(User user) throws Exception {
> //don't allow delete user
> throw new MessageException(new ApplicationMessage("IntranetUserEventListener.msg.delete-user-read-only-mode-error", null, ApplicationMessage.WARNING));
> }
> {code}
> This listener can help to not allow delete user, but all memberships of user still are deleted.
> Check logic of deleting users (in file https://github.com/exoplatform/gatein-portal/blob/3.5.x-PLF/component/ide...): we can see it deletes all membershis of an user before broadcast event "preDelete"
> {code}
> public User removeUser(String userName, boolean broadcast) throws Exception {
> //...
>
> try {
> // Remove all memberships and profile first
> orgService.getMembershipHandler().removeMembershipByUser(userName, false);
> orgService.getUserProfileHandler().removeUserProfile(userName, false);
> } catch (Exception e) {
> handleException("Cannot cleanup user relationships: " + userName + "; ", e);
> }
> User exoUser = getPopulatedUser(userName, session);
> if (broadcast) {
> preDelete(exoUser);
> }
> try {
> session.getPersistenceManager().removeUser(foundUser, true);
> } catch (IdentityException e) {
> handleException("Cannot remove user: " + userName + "; ", e);
> }
> //...
> }
> {code}
> Expectation:
> 1) broadcast preDelete(exoUser) should be run before delete anything
> 2) Delete user and its membership should be run in one transaction
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (GTNPORTAL-2072) NoSuchDataException is thrown after importing pages through export/import tool.
by Vu Viet Phuong (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-2072?page=com.atlassian.jira.pl... ]
Vu Viet Phuong reassigned GTNPORTAL-2072:
-----------------------------------------
Assignee: Vu Viet Phuong (was: Nick Scavelli)
> NoSuchDataException is thrown after importing pages through export/import tool.
> -------------------------------------------------------------------------------
>
> Key: GTNPORTAL-2072
> URL: https://issues.jboss.org/browse/GTNPORTAL-2072
> Project: GateIn Portal
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 3.2.0-Beta01
> Reporter: Nick Scavelli
> Assignee: Vu Viet Phuong
> Labels: import
> Original Estimate: 1 day
> Remaining Estimate: 1 day
>
> Below exception is thrown after importing pages through management tools (see steps to reproduce section). I think this is a stale storageId coming from the UI when the data has changed outside the UI. Typically logging out solves the issue, but this isn't optimal. Changes to data should not be only achievable through the UI. The changes are being sent through DataStorage, so there should be someway to sync this data up.
> Stacktrace:
> {noformat}
> Caused by: org.exoplatform.portal.config.NoSuchDataException: Can not find 1c42bec77f0000011076449207f5d085
> at org.exoplatform.portal.pom.config.POMSession.findCustomizationById(POMSession.java:214)
> at org.exoplatform.portal.pom.config.tasks.PreferencesTask$Load.run(PreferencesTask.java:91)
> at org.exoplatform.portal.pom.config.POMSession.execute(POMSession.java:405)
> at org.exoplatform.portal.pom.config.ExecutorDispatcher.execute(ExecutorDispatcher.java:60)
> at org.exoplatform.portal.pom.config.TaskExecutionDecorator.execute(TaskExecutionDecorator.java:38)
> at org.exoplatform.portal.pom.config.cache.DataCache.read(DataCache.java:169)
> at org.exoplatform.portal.pom.config.cache.DataCache.execute(DataCache.java:61)
> at org.exoplatform.portal.pom.config.TaskExecutionDecorator.execute(TaskExecutionDecorator.java:38)
> at org.exoplatform.portal.pom.config.cache.PortalNamesCache.execute(PortalNamesCache.java:77)
> at org.exoplatform.portal.pom.config.POMSessionManager.execute(POMSessionManager.java:251)
> at org.exoplatform.portal.pom.config.POMDataStorage.load(POMDataStorage.java:176)
> at org.exoplatform.portal.config.DataStorageImpl.load(DataStorageImpl.java:111)
> at org.exoplatform.portal.webui.application.ModelAdapter$1.getPortletContext(ModelAdapter.java:89)
> at org.exoplatform.portal.webui.application.UIPortlet.getPortletContext(UIPortlet.java:993)
> at org.exoplatform.portal.webui.application.UIPortlet.create(UIPortlet.java:829)
> at org.exoplatform.portal.webui.application.UIPortletLifecycle.processRender(UIPortletLifecycle.java:212)
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (GTNPORTAL-3285) Logic of deleting user is not proper
by Tuyen Nguyen The (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-3285?page=com.atlassian.jira.pl... ]
Tuyen Nguyen The commented on GTNPORTAL-3285:
---------------------------------------------
When i try to resolve this issue, i see that we have an UserEventListener:
{code}
org.exoplatform.services.organization.impl.NewUserEventListener
{code}
It has method:
{code}
public void preDelete(User user) throws Exception {
PortalContainer pcontainer = PortalContainer.getInstance();
OrganizationService service =
(OrganizationService)pcontainer.getComponentInstanceOfType(OrganizationService.class);
UserProfile up = service.getUserProfileHandler().createUserProfileInstance();
up.setUserName(user.getUserName());
service.getUserProfileHandler().removeUserProfile(user.getUserName(), false);
service.getMembershipHandler().removeMembershipByUser(user.getUserName(), false);
}
{code}
It mean that user profile and membership will be removed before user is removed.
It conflict with specification of #removeUser(), it comment:
{code}
/**
* Remove an user and broadcast the event to all the registered listener. When
* the user is removed , the user profile and all the membership of the user
* should be removed as well.
*
* @param userName The user should be removed from the user database
* @param broadcast If broadcast is true, the delete user event should be
* broadcasted to all registered listener
* @return the User object after that user has been removed from
* database
* @throws Exception The exception can be thrown if the user could not
* be removed or any listeners fail to handle the
* user event.
*/
User removeUser(String userName, boolean broadcast) throws Exception;
{code}
All implement of this care to remove user-profile and membership of user when remove user. So, this work is duplicated.
> Logic of deleting user is not proper
> ------------------------------------
>
> Key: GTNPORTAL-3285
> URL: https://issues.jboss.org/browse/GTNPORTAL-3285
> Project: GateIn Portal
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Reporter: Tuyen Nguyen The
> Assignee: Tuyen Nguyen The
>
> I try to add a listener to not allow delete Platform users. for example:
> {code}
> public class IntranetUserEventListenerImpl extends UserEventListener {
> @Override
> public void preDelete(User user) throws Exception {
> //don't allow delete user
> throw new MessageException(new ApplicationMessage("IntranetUserEventListener.msg.delete-user-read-only-mode-error", null, ApplicationMessage.WARNING));
> }
> {code}
> This listener can help to not allow delete user, but all memberships of user still are deleted.
> Check logic of deleting users (in file https://github.com/exoplatform/gatein-portal/blob/3.5.x-PLF/component/ide...): we can see it deletes all membershis of an user before broadcast event "preDelete"
> {code}
> public User removeUser(String userName, boolean broadcast) throws Exception {
> //...
>
> try {
> // Remove all memberships and profile first
> orgService.getMembershipHandler().removeMembershipByUser(userName, false);
> orgService.getUserProfileHandler().removeUserProfile(userName, false);
> } catch (Exception e) {
> handleException("Cannot cleanup user relationships: " + userName + "; ", e);
> }
> User exoUser = getPopulatedUser(userName, session);
> if (broadcast) {
> preDelete(exoUser);
> }
> try {
> session.getPersistenceManager().removeUser(foundUser, true);
> } catch (IdentityException e) {
> handleException("Cannot remove user: " + userName + "; ", e);
> }
> //...
> }
> {code}
> Expectation:
> 1) broadcast preDelete(exoUser) should be run before delete anything
> 2) Delete user and its membership should be run in one transaction
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (GTNPORTAL-3285) Logic of deleting user is not proper
by Tuyen Nguyen The (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-3285?page=com.atlassian.jira.pl... ]
Tuyen Nguyen The updated GTNPORTAL-3285:
----------------------------------------
Description:
I try to add a listener to not allow delete Platform users. for example:
{code}
public class IntranetUserEventListenerImpl extends UserEventListener {
@Override
public void preDelete(User user) throws Exception {
//don't allow delete user
throw new MessageException(new ApplicationMessage("IntranetUserEventListener.msg.delete-user-read-only-mode-error", null, ApplicationMessage.WARNING));
}
{code}
This listener can help to not allow delete Platform user, but all memberships of user still are deleted.
Check logic of deleting users (in file https://github.com/exoplatform/gatein-portal/blob/3.5.x-PLF/component/ide...): we can see it deletes all membershis of an user before broadcast event "preDelete"
{code}
public User removeUser(String userName, boolean broadcast) throws Exception {
//...
try {
// Remove all memberships and profile first
orgService.getMembershipHandler().removeMembershipByUser(userName, false);
orgService.getUserProfileHandler().removeUserProfile(userName, false);
} catch (Exception e) {
handleException("Cannot cleanup user relationships: " + userName + "; ", e);
}
User exoUser = getPopulatedUser(userName, session);
if (broadcast) {
preDelete(exoUser);
}
try {
session.getPersistenceManager().removeUser(foundUser, true);
} catch (IdentityException e) {
handleException("Cannot remove user: " + userName + "; ", e);
}
//...
}
{code}
Expectation:
1) broadcast preDelete(exoUser) should be run before delete anything
2) Delete user and its membership should be run in one transaction
> Logic of deleting user is not proper
> ------------------------------------
>
> Key: GTNPORTAL-3285
> URL: https://issues.jboss.org/browse/GTNPORTAL-3285
> Project: GateIn Portal
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Affects Versions: 3.7.0.Final
> Reporter: Tuyen Nguyen The
> Assignee: Tuyen Nguyen The
>
> I try to add a listener to not allow delete Platform users. for example:
> {code}
> public class IntranetUserEventListenerImpl extends UserEventListener {
> @Override
> public void preDelete(User user) throws Exception {
> //don't allow delete user
> throw new MessageException(new ApplicationMessage("IntranetUserEventListener.msg.delete-user-read-only-mode-error", null, ApplicationMessage.WARNING));
> }
> {code}
> This listener can help to not allow delete Platform user, but all memberships of user still are deleted.
> Check logic of deleting users (in file https://github.com/exoplatform/gatein-portal/blob/3.5.x-PLF/component/ide...): we can see it deletes all membershis of an user before broadcast event "preDelete"
> {code}
> public User removeUser(String userName, boolean broadcast) throws Exception {
> //...
>
> try {
> // Remove all memberships and profile first
> orgService.getMembershipHandler().removeMembershipByUser(userName, false);
> orgService.getUserProfileHandler().removeUserProfile(userName, false);
> } catch (Exception e) {
> handleException("Cannot cleanup user relationships: " + userName + "; ", e);
> }
> User exoUser = getPopulatedUser(userName, session);
> if (broadcast) {
> preDelete(exoUser);
> }
> try {
> session.getPersistenceManager().removeUser(foundUser, true);
> } catch (IdentityException e) {
> handleException("Cannot remove user: " + userName + "; ", e);
> }
> //...
> }
> {code}
> Expectation:
> 1) broadcast preDelete(exoUser) should be run before delete anything
> 2) Delete user and its membership should be run in one transaction
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (GTNPORTAL-3285) Logic of deleting user is not proper
by Tuyen Nguyen The (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-3285?page=com.atlassian.jira.pl... ]
Tuyen Nguyen The updated GTNPORTAL-3285:
----------------------------------------
Affects Version/s: (was: 3.7.0.Final)
> Logic of deleting user is not proper
> ------------------------------------
>
> Key: GTNPORTAL-3285
> URL: https://issues.jboss.org/browse/GTNPORTAL-3285
> Project: GateIn Portal
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Reporter: Tuyen Nguyen The
> Assignee: Tuyen Nguyen The
>
> I try to add a listener to not allow delete Platform users. for example:
> {code}
> public class IntranetUserEventListenerImpl extends UserEventListener {
> @Override
> public void preDelete(User user) throws Exception {
> //don't allow delete user
> throw new MessageException(new ApplicationMessage("IntranetUserEventListener.msg.delete-user-read-only-mode-error", null, ApplicationMessage.WARNING));
> }
> {code}
> This listener can help to not allow delete user, but all memberships of user still are deleted.
> Check logic of deleting users (in file https://github.com/exoplatform/gatein-portal/blob/3.5.x-PLF/component/ide...): we can see it deletes all membershis of an user before broadcast event "preDelete"
> {code}
> public User removeUser(String userName, boolean broadcast) throws Exception {
> //...
>
> try {
> // Remove all memberships and profile first
> orgService.getMembershipHandler().removeMembershipByUser(userName, false);
> orgService.getUserProfileHandler().removeUserProfile(userName, false);
> } catch (Exception e) {
> handleException("Cannot cleanup user relationships: " + userName + "; ", e);
> }
> User exoUser = getPopulatedUser(userName, session);
> if (broadcast) {
> preDelete(exoUser);
> }
> try {
> session.getPersistenceManager().removeUser(foundUser, true);
> } catch (IdentityException e) {
> handleException("Cannot remove user: " + userName + "; ", e);
> }
> //...
> }
> {code}
> Expectation:
> 1) broadcast preDelete(exoUser) should be run before delete anything
> 2) Delete user and its membership should be run in one transaction
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (GTNPORTAL-3285) Logic of deleting user is not proper
by Tuyen Nguyen The (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-3285?page=com.atlassian.jira.pl... ]
Tuyen Nguyen The updated GTNPORTAL-3285:
----------------------------------------
Description:
I try to add a listener to not allow delete Platform users. for example:
{code}
public class IntranetUserEventListenerImpl extends UserEventListener {
@Override
public void preDelete(User user) throws Exception {
//don't allow delete user
throw new MessageException(new ApplicationMessage("IntranetUserEventListener.msg.delete-user-read-only-mode-error", null, ApplicationMessage.WARNING));
}
{code}
This listener can help to not allow delete user, but all memberships of user still are deleted.
Check logic of deleting users (in file https://github.com/exoplatform/gatein-portal/blob/3.5.x-PLF/component/ide...): we can see it deletes all membershis of an user before broadcast event "preDelete"
{code}
public User removeUser(String userName, boolean broadcast) throws Exception {
//...
try {
// Remove all memberships and profile first
orgService.getMembershipHandler().removeMembershipByUser(userName, false);
orgService.getUserProfileHandler().removeUserProfile(userName, false);
} catch (Exception e) {
handleException("Cannot cleanup user relationships: " + userName + "; ", e);
}
User exoUser = getPopulatedUser(userName, session);
if (broadcast) {
preDelete(exoUser);
}
try {
session.getPersistenceManager().removeUser(foundUser, true);
} catch (IdentityException e) {
handleException("Cannot remove user: " + userName + "; ", e);
}
//...
}
{code}
Expectation:
1) broadcast preDelete(exoUser) should be run before delete anything
2) Delete user and its membership should be run in one transaction
was:
I try to add a listener to not allow delete Platform users. for example:
{code}
public class IntranetUserEventListenerImpl extends UserEventListener {
@Override
public void preDelete(User user) throws Exception {
//don't allow delete user
throw new MessageException(new ApplicationMessage("IntranetUserEventListener.msg.delete-user-read-only-mode-error", null, ApplicationMessage.WARNING));
}
{code}
This listener can help to not allow delete Platform user, but all memberships of user still are deleted.
Check logic of deleting users (in file https://github.com/exoplatform/gatein-portal/blob/3.5.x-PLF/component/ide...): we can see it deletes all membershis of an user before broadcast event "preDelete"
{code}
public User removeUser(String userName, boolean broadcast) throws Exception {
//...
try {
// Remove all memberships and profile first
orgService.getMembershipHandler().removeMembershipByUser(userName, false);
orgService.getUserProfileHandler().removeUserProfile(userName, false);
} catch (Exception e) {
handleException("Cannot cleanup user relationships: " + userName + "; ", e);
}
User exoUser = getPopulatedUser(userName, session);
if (broadcast) {
preDelete(exoUser);
}
try {
session.getPersistenceManager().removeUser(foundUser, true);
} catch (IdentityException e) {
handleException("Cannot remove user: " + userName + "; ", e);
}
//...
}
{code}
Expectation:
1) broadcast preDelete(exoUser) should be run before delete anything
2) Delete user and its membership should be run in one transaction
> Logic of deleting user is not proper
> ------------------------------------
>
> Key: GTNPORTAL-3285
> URL: https://issues.jboss.org/browse/GTNPORTAL-3285
> Project: GateIn Portal
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Affects Versions: 3.7.0.Final
> Reporter: Tuyen Nguyen The
> Assignee: Tuyen Nguyen The
>
> I try to add a listener to not allow delete Platform users. for example:
> {code}
> public class IntranetUserEventListenerImpl extends UserEventListener {
> @Override
> public void preDelete(User user) throws Exception {
> //don't allow delete user
> throw new MessageException(new ApplicationMessage("IntranetUserEventListener.msg.delete-user-read-only-mode-error", null, ApplicationMessage.WARNING));
> }
> {code}
> This listener can help to not allow delete user, but all memberships of user still are deleted.
> Check logic of deleting users (in file https://github.com/exoplatform/gatein-portal/blob/3.5.x-PLF/component/ide...): we can see it deletes all membershis of an user before broadcast event "preDelete"
> {code}
> public User removeUser(String userName, boolean broadcast) throws Exception {
> //...
>
> try {
> // Remove all memberships and profile first
> orgService.getMembershipHandler().removeMembershipByUser(userName, false);
> orgService.getUserProfileHandler().removeUserProfile(userName, false);
> } catch (Exception e) {
> handleException("Cannot cleanup user relationships: " + userName + "; ", e);
> }
> User exoUser = getPopulatedUser(userName, session);
> if (broadcast) {
> preDelete(exoUser);
> }
> try {
> session.getPersistenceManager().removeUser(foundUser, true);
> } catch (IdentityException e) {
> handleException("Cannot remove user: " + userName + "; ", e);
> }
> //...
> }
> {code}
> Expectation:
> 1) broadcast preDelete(exoUser) should be run before delete anything
> 2) Delete user and its membership should be run in one transaction
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years