Error 404
Bug resolu ds le Core : getConferences(User user) User Information Menu submission quand pas auteur
This commit is contained in:
@@ -9,6 +9,7 @@ disclaimer.link.about=About
|
|||||||
|
|
||||||
###################
|
###################
|
||||||
# LOGIN FORM
|
# LOGIN FORM
|
||||||
|
login.title=Login and/or create a new user
|
||||||
login.btn.connexion=Connexion
|
login.btn.connexion=Connexion
|
||||||
login.btn.logout=Logout
|
login.btn.logout=Logout
|
||||||
login.field.login=Login
|
login.field.login=Login
|
||||||
@@ -28,6 +29,7 @@ login.message.error=Your login attempt was not successful, try again.
|
|||||||
###################
|
###################
|
||||||
# USER INFORMATION HEADER
|
# USER INFORMATION HEADER
|
||||||
user.information.editaccount=Edit my account
|
user.information.editaccount=Edit my account
|
||||||
|
user.information.followconference={0,choice, 0#You doesn t have any conference | 1#You currently follow {0} conference | 1<You currently follow {0} conferences}
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# USER MENU
|
# USER MENU
|
||||||
@@ -55,10 +57,14 @@ menu.author.article.modify=Manage my articles
|
|||||||
|
|
||||||
menu.anonymous.title=Menu
|
menu.anonymous.title=Menu
|
||||||
menu.anonymous.article.submission=Article's submission
|
menu.anonymous.article.submission=Article's submission
|
||||||
CHAIRMAN=Chairman
|
|
||||||
PCMEMBER=PC Member
|
###################
|
||||||
REFEREE=Referee
|
# ROLE
|
||||||
AUTHOR=Author
|
role.chairman=Chairman
|
||||||
|
role.pcmember=PC Member
|
||||||
|
role.referee=Referee
|
||||||
|
role.author=Author
|
||||||
|
role.none=You don't have any roles for this conference
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# REGISTRATION USER
|
# REGISTRATION USER
|
||||||
@@ -86,6 +92,10 @@ form.register.error.alreadyExists=A user with this login already exists. Please
|
|||||||
message.error.noconferenceforthisid=This conference doesn't exist. Pease try again
|
message.error.noconferenceforthisid=This conference doesn't exist. Pease try again
|
||||||
message.error.noconferenceid=No conference selectionned
|
message.error.noconferenceid=No conference selectionned
|
||||||
message.error.conferenceerror=Error. Try again.
|
message.error.conferenceerror=Error. Try again.
|
||||||
|
message.error.page404.title=Page not found
|
||||||
|
message.error.page404.content=Sorry, the page where you looking for, doesn't found.
|
||||||
|
message.error.page403.title=Acces denied
|
||||||
|
message.error.page403.content=Sorry, you have not access at this page.
|
||||||
|
|
||||||
|
|
||||||
submission.title=Article's submission
|
submission.title=Article's submission
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||||
<%@ taglib prefix="authz" uri="http://acegisecurity.org/authz" %>
|
<%@ taglib prefix="authz" uri="http://acegisecurity.org/authz" %>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
<c:if test="${currentConferenceId != null}">
|
<c:if test="${currentConferenceId != null}">
|
||||||
|
|
||||||
<!-- AUTHOR MENU : CHAIRMAN -->
|
<!-- MENU : CHAIRMAN -->
|
||||||
<authz:authorize ifAllGranted="ROLE_CHAIRMAN">
|
<authz:authorize ifAllGranted="ROLE_CHAIRMAN">
|
||||||
<div id="mainmenubloc">
|
<div id="mainmenubloc">
|
||||||
<h4><fmt:message key="menu.chairman.title" /></h4>
|
<h4><fmt:message key="menu.chairman.title" /></h4>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</authz:authorize>
|
</authz:authorize>
|
||||||
|
|
||||||
<!-- AUTHOR MENU : ROLE_PCMEMBER -->
|
<!-- MENU : ROLE_PCMEMBER -->
|
||||||
<authz:authorize ifAllGranted="ROLE_PCMEMBER">
|
<authz:authorize ifAllGranted="ROLE_PCMEMBER">
|
||||||
<div id="mainmenubloc">
|
<div id="mainmenubloc">
|
||||||
<h4><fmt:message key="menu.pcmember.title" /></h4>
|
<h4><fmt:message key="menu.pcmember.title" /></h4>
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</authz:authorize>
|
</authz:authorize>
|
||||||
|
|
||||||
<!-- AUTHOR MENU : ROLE_REFEREE -->
|
<!-- MENU : ROLE_REFEREE -->
|
||||||
<authz:authorize ifAllGranted="ROLE_REFEREE">
|
<authz:authorize ifAllGranted="ROLE_REFEREE">
|
||||||
<div id="mainmenubloc">
|
<div id="mainmenubloc">
|
||||||
<h4><fmt:message key="menu.referee.title" /></h4>
|
<h4><fmt:message key="menu.referee.title" /></h4>
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</authz:authorize>
|
</authz:authorize>
|
||||||
|
|
||||||
<!-- AUTHOR MENU : ROLE_AUTHOR -->
|
<!-- MENU : ROLE_AUTHOR -->
|
||||||
<authz:authorize ifAllGranted="ROLE_AUTHOR">
|
<authz:authorize ifAllGranted="ROLE_AUTHOR">
|
||||||
<div id="mainmenubloc">
|
<div id="mainmenubloc">
|
||||||
<h4><fmt:message key="menu.author.title" /></h4>
|
<h4><fmt:message key="menu.author.title" /></h4>
|
||||||
@@ -65,8 +65,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</authz:authorize>
|
</authz:authorize>
|
||||||
|
|
||||||
<!-- AUTHOR MENU : ROLE_ANONYMOUS -->
|
<!-- MENU : ROLE_ANONYMOUS -->
|
||||||
<authz:authorize ifAllGranted="ROLE_ANONYMOUS">
|
<authz:authorize ifNotGranted="ROLE_AUTHOR">
|
||||||
<div id="mainmenubloc">
|
<div id="mainmenubloc">
|
||||||
<h4><fmt:message key="menu.anonymous.title" /></h4>
|
<h4><fmt:message key="menu.anonymous.title" /></h4>
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
<%@ include file="/WEB-INF/decorators/include.jsp"%>
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<head></head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
File doesn't exist.
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,10 +1,36 @@
|
|||||||
<%@ include file="/WEB-INF/decorators/include.jsp"%>
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head></head>
|
<head>
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
h1 a{
|
||||||
|
color: #FF4747;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 a:hover{
|
||||||
|
color: #FF0000;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
Error : page not found
|
<center>
|
||||||
|
<br/><br/><br/>
|
||||||
|
<img src="./images/404.jpg" alt="404" /><br/>
|
||||||
|
|
||||||
|
<h1> <a href="main.htm">
|
||||||
|
|
||||||
|
4o4 Error - Page not found
|
||||||
|
|
||||||
|
</a></h1>
|
||||||
|
|
||||||
|
</center>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<head></head>
|
<head></head>
|
||||||
<body>
|
<body>
|
||||||
<h4 class="title">NON NAME</h4>
|
<h4 class="title"><fmt:message key="login.title" /></h4>
|
||||||
|
|
||||||
<c:if test="${not empty param.login_error}">
|
<c:if test="${not empty param.login_error}">
|
||||||
<div class="login_error">
|
<div class="login_error">
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<input type="checkbox" name="_acegi_security_remember_me"/> <fmt:message key='login.label.rememberme' /><br />
|
<input type="checkbox" name="_acegi_security_remember_me"/> <fmt:message key='login.label.rememberme' /><br />
|
||||||
|
|
||||||
<br /><br />
|
<br /><br />
|
||||||
<a href="javascript:document.getElementById('formlogin').submit();" id="submit_btn"><fmt:message key="login.label.connexion" /></a>
|
<a href="javascript:document.getElementById('formlogin').submit();" id="submit_btn"><fmt:message key="login.btn.connexion" /></a>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</td></tr>
|
</td></tr>
|
||||||
|
|||||||
@@ -4,10 +4,16 @@
|
|||||||
<html>
|
<html>
|
||||||
<head></head>
|
<head></head>
|
||||||
<body>
|
<body>
|
||||||
|
<br />
|
||||||
|
<b>${ currentUser.firstName } ${ currentUser.lastName }</b><br />
|
||||||
|
|
||||||
${ currentUser.firstName } ${ currentUser.lastName } <b>(<authz:authentication operation="username"></authz:authentication>)</b><br />
|
<a href="listConference.htm" >
|
||||||
You currently follow <b>4</b> conferences<br />
|
<fmt:message key="user.information.followconference" >
|
||||||
You have the following rights : <b>Author, Chairman, PC Member</b><br />
|
<fmt:param value="${nbUserConferences}" />
|
||||||
|
</fmt:message>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<br />
|
||||||
<a href="registerUser.htm"><fmt:message key="user.information.editaccount" /></a><br />
|
<a href="registerUser.htm"><fmt:message key="user.information.editaccount" /></a><br />
|
||||||
<a href="j_acegi_logout" id="submit_btn"><fmt:message key="login.btn.logout" /></a>
|
<a href="j_acegi_logout" id="submit_btn"><fmt:message key="login.btn.logout" /></a>
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
</filter-mapping>
|
</filter-mapping>
|
||||||
|
|
||||||
|
|
||||||
<!-- SiteMesh Integration declaration Start -->
|
<!-- SiteMesh Integration declaration Start -->
|
||||||
<filter>
|
<filter>
|
||||||
<filter-name>sitemesh</filter-name>
|
<filter-name>sitemesh</filter-name>
|
||||||
<filter-class>
|
<filter-class>
|
||||||
@@ -104,10 +104,6 @@
|
|||||||
<!-- SessionService Integration declaration End -->
|
<!-- SessionService Integration declaration End -->
|
||||||
|
|
||||||
<!-- no access error -->
|
<!-- no access error -->
|
||||||
<error-page>
|
|
||||||
<error-code>403</error-code>
|
|
||||||
<location>/WEB-INF/jsp/errors/403error.jsp</location>
|
|
||||||
</error-page>
|
|
||||||
|
|
||||||
<!-- page not found error -->
|
<!-- page not found error -->
|
||||||
<error-page>
|
<error-page>
|
||||||
|
|||||||
BIN
YACOSWeb/WebContent/images/404.jpg
Normal file
BIN
YACOSWeb/WebContent/images/404.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 37 KiB |
@@ -1,5 +1,7 @@
|
|||||||
package org.yacos.web.system.session;
|
package org.yacos.web.system.session;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import javax.naming.Context;
|
import javax.naming.Context;
|
||||||
import javax.naming.InitialContext;
|
import javax.naming.InitialContext;
|
||||||
import javax.naming.NamingException;
|
import javax.naming.NamingException;
|
||||||
@@ -16,6 +18,7 @@ import org.yacos.core.conferences.Conference;
|
|||||||
import org.yacos.core.conferences.IConferenceManager;
|
import org.yacos.core.conferences.IConferenceManager;
|
||||||
import org.yacos.core.users.IUserManager;
|
import org.yacos.core.users.IUserManager;
|
||||||
import org.yacos.core.users.User;
|
import org.yacos.core.users.User;
|
||||||
|
import org.yacos.core.users.Role;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides Session related Services
|
* Provides Session related Services
|
||||||
@@ -33,6 +36,7 @@ public class SessionService {
|
|||||||
|
|
||||||
private User currentUser;
|
private User currentUser;
|
||||||
private Conference currentConference;
|
private Conference currentConference;
|
||||||
|
private int nbUserConferences;
|
||||||
|
|
||||||
private SessionService(){
|
private SessionService(){
|
||||||
}
|
}
|
||||||
@@ -59,9 +63,12 @@ public class SessionService {
|
|||||||
// Put the current conference in the request context to make it accessible in JSPs
|
// Put the current conference in the request context to make it accessible in JSPs
|
||||||
// This avoid to put the whole object in the session
|
// This avoid to put the whole object in the session
|
||||||
request.setAttribute("currentConference", getCurrentConference());
|
request.setAttribute("currentConference", getCurrentConference());
|
||||||
// Put the current conference in the request context to make it accessible in JSPs
|
// Put the current user in the request context to make it accessible in JSPs
|
||||||
// This avoid to put the whole object in the session
|
// This avoid to put the whole object in the session
|
||||||
request.setAttribute("currentUser", getCurrentUser());
|
request.setAttribute("currentUser", getCurrentUser());
|
||||||
|
// Put the current roles for this user
|
||||||
|
//request.setAttribute("nbUserConferences",getNbUserConferences());
|
||||||
|
|
||||||
} catch (NamingException e) {
|
} catch (NamingException e) {
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -69,6 +76,21 @@ public class SessionService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getNbUserConferences() {
|
||||||
|
if(nbUserConferences == -1)
|
||||||
|
{
|
||||||
|
setNbUserConferences();
|
||||||
|
}
|
||||||
|
|
||||||
|
return nbUserConferences;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNbUserConferences() {
|
||||||
|
int nb = conferenceManager.getConferences(getCurrentUser()).size();
|
||||||
|
this.nbUserConferences = nb;
|
||||||
|
request.setAttribute("nbUserConferences", getNbUserConferences());
|
||||||
|
}
|
||||||
|
|
||||||
public void setConferenceManager(IConferenceManager conferenceManager) {
|
public void setConferenceManager(IConferenceManager conferenceManager) {
|
||||||
this.conferenceManager = conferenceManager;
|
this.conferenceManager = conferenceManager;
|
||||||
}
|
}
|
||||||
@@ -155,32 +177,12 @@ public class SessionService {
|
|||||||
if( currentConference == null && id != null ){
|
if( currentConference == null && id != null ){
|
||||||
currentConference = conferenceManager.getConference(id);
|
currentConference = conferenceManager.getConference(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isUserLogged()){setNbUserConferences();};
|
||||||
|
|
||||||
return currentConference;
|
return currentConference;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the current user by providing the user object
|
|
||||||
* @param request The current HTTP request object, necessary for session operations
|
|
||||||
* @param currentUser The new current user to set
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public void setCurrentUser(User currentUser) {
|
|
||||||
this.currentUser = currentUser;
|
|
||||||
this.setCurrentUserLogin(currentUser.getLogin());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the current user login
|
|
||||||
* @param request The current HTTP request object, necessary for session operations
|
|
||||||
* @param login The new current user login
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public void setCurrentUserLogin(String login) {
|
|
||||||
WebUtils.setSessionAttribute(request, "currentUserLogin", login);
|
|
||||||
currentUser = userManager.getUser(login);
|
|
||||||
request.setAttribute("currentUser", currentUser);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the current user login from the session
|
* Gets the current user login from the session
|
||||||
* Additionally, puts the current User object in the request context
|
* Additionally, puts the current User object in the request context
|
||||||
@@ -269,5 +271,6 @@ public class SessionService {
|
|||||||
|
|
||||||
SecurityContextHolder.getContext().setAuthentication(authProvider.authenticate(currentAuthentication));
|
SecurityContextHolder.getContext().setAuthentication(authProvider.authenticate(currentAuthentication));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user