Added support for Terms of Use Display
git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/join-vre@150827 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
3101ad62ab
commit
97ccf4e896
|
@ -107,7 +107,7 @@ public class JoinServiceImpl extends RemoteServiceServlet implements JoinService
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getTermsOfUse(long siteId) {
|
public String getTermsOfUse(long siteId) {
|
||||||
|
|
||||||
TermsOfUse tou = new TermsOfUseImpl();
|
TermsOfUse tou = new TermsOfUseImpl();
|
||||||
try {
|
try {
|
||||||
long groupId = new LiferayGroupManager().getGroup(siteId).getGroupId();
|
long groupId = new LiferayGroupManager().getGroup(siteId).getGroupId();
|
||||||
|
@ -377,6 +377,10 @@ public class JoinServiceImpl extends RemoteServiceServlet implements JoinService
|
||||||
}
|
}
|
||||||
_log.debug("Request does not exist, addMembershipRequest for user " + username);
|
_log.debug("Request does not exist, addMembershipRequest for user " + username);
|
||||||
LoginServiceUtil.addMembershipRequest(username, scope, optionalMessage, getThreadLocalRequest());
|
LoginServiceUtil.addMembershipRequest(username, scope, optionalMessage, getThreadLocalRequest());
|
||||||
|
if (getTermsOfUse(groupId) != null) {
|
||||||
|
new TermsOfUseImpl().hasAcceptedToU(username, groupId);
|
||||||
|
_log.info(username + "has requested and acceptedToU OK for " + scope);
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -417,8 +421,10 @@ public class JoinServiceImpl extends RemoteServiceServlet implements JoinService
|
||||||
LoginServiceUtil.notifyUserSelfRegistration(currUser.getUsername(), scope, getThreadLocalRequest());
|
LoginServiceUtil.notifyUserSelfRegistration(currUser.getUsername(), scope, getThreadLocalRequest());
|
||||||
_log.info("notifyUserSelfRegistration sent");
|
_log.info("notifyUserSelfRegistration sent");
|
||||||
}
|
}
|
||||||
new TermsOfUseImpl().hasAcceptedToU(currUser.getUsername(), groupId);
|
if (getTermsOfUse(groupId) != null) {
|
||||||
_log.info("hasAcceptedToU OK for " + currUser.getUsername());
|
new TermsOfUseImpl().hasAcceptedToU(currUser.getUsername(), groupId);
|
||||||
|
_log.info("hasAcceptedToU OK for " + currUser.getUsername());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -456,7 +462,7 @@ public class JoinServiceImpl extends RemoteServiceServlet implements JoinService
|
||||||
_log.debug("checking if invite exists for " + email + " on " +infraScope);
|
_log.debug("checking if invite exists for " + email + " on " +infraScope);
|
||||||
return store.isExistingInvite(infraScope, email);
|
return store.isExistingInvite(infraScope, email);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue