Commit 535ef041 authored by didonet's avatar didonet

Changes in the authentication provider in order to deploy it.

parent 8c5b2084
......@@ -74,6 +74,7 @@ public class KerberosAuthProvider implements UserDetailsService {
// Get user's LDAP groups.
List<?> personGroups = LdapAttrProvider.getPersonGroups(removeKrbSuffix(username));
Collection<? extends GrantedAuthority> personAuth = null;
Integer authPriority = 0;
......@@ -99,6 +100,7 @@ public class KerberosAuthProvider implements UserDetailsService {
authPriority=1;
}
}
return personAuth;
}
......
......@@ -215,8 +215,10 @@ public class PermissionProvider {
}
public boolean isModificationPeriod(String id, String requestType){
System.out.println("Executando isModificationPeriod(1): '"+requestType+"', com o parametro: "+id);
System.out.println("Executando isModificationPeriod(1): '"+requestType+"', com o parametro: "+id);
if (personAuth().equals(Funcionario) || personAuth().equals(Administrador))
return true;
String currentYear=Configuration.findConfigValueByName("current.year");
String currentPeriod=Configuration.findConfigValueByName("current.period");
String modificationPeriodIsOpen=Configuration.findConfigValueByName("transcript.modification.open");
......
......@@ -22,7 +22,7 @@ import com.itextpdf.text.Paragraph;
import com.itextpdf.text.pdf.PdfWriter;
public class ReportUtil {
public static final String LOGO_UFPR = "http://localhost:8080/sapos/resources/images/logo_ufpr.jpg";
public static final String LOGO_UFPR = "https://sapos:8443/sapos/resources/images/logo_ufpr.jpg";
public static PdfWriter getPdfWriter(Document document, HttpServletResponse response) throws IOException, DocumentException {
return PdfWriter.getInstance(document, response.getOutputStream());
......@@ -63,7 +63,7 @@ public class ReportUtil {
e1.printStackTrace();
}
image.setAlignment(Image.LEFT | Image.TEXTWRAP);
image.setAlignment(Image.LEFT | Image.TEXTWRAP);
document.add(image);
document.add(Chunk.NEWLINE);
document.add(new Paragraph(""));
......
......@@ -22,7 +22,15 @@
<form-login login-processing-url="/resources/j_spring_security_check"
login-page="/login" authentication-failure-url="/login?login_error=t" />
<logout logout-url="/resources/j_spring_security_logout"/>
<!-- registration requests -->
<intercept-url pattern="^/registrationrequests.*" access="permitAll" requires-channel="https"/>
<!-- http://localhost:8080/sapos/registrationrequests?newrequest&lang=pt_BR -->
<!-- Login page and Public Resources -->
<intercept-url pattern="^/resources/.*$" access="permitAll" requires-channel="https"/>
<intercept-url pattern="^/login(\?login_error=t)?$" access="permitAll" requires-channel="https"/>
......@@ -38,9 +46,10 @@
and @permissionProvider.hasPermissionToView(request.getParameter('professor'),'professor')"/>
<!-- INGRESSOS - Show -->
<intercept-url pattern="^/registrations/studentinfo\?registration=[0-9]+$"
access="hasAnyRole('Administrador', 'Funcionario', 'Professor', 'Aluno')"/>
<!-- INGRESSOS - Show -->
<intercept-url pattern="^/registrations/studentinfo\?registration=[0-9]+$"
access="hasAnyRole('Administrador', 'Funcionario', 'Professor', 'Aluno')
and @permissionProvider.hasPermissionToView(request.getParameter('registration'),'registration')"/>
<!-- INGRESSOS - Listar Ingressos" -->
<intercept-url pattern="^/registrations(/list\?.*)?$"
access="hasAnyRole('Administrador', 'Funcionario', 'Professor')" />
......@@ -127,6 +136,8 @@
<intercept-url pattern="^/.*$" method="POST" access="hasAnyRole('Administrador', 'Funcionario')" requires-channel="https"/>
<intercept-url pattern="^/.*$" access="hasAnyRole('Administrador', 'Funcionario')" requires-channel="https"/>
</http>
</beans:beans>
\ No newline at end of file
# These settings are always needed
# ================================
krb.debug=true
krb.debug=false
# These settings are only needed for SPNEGO Authentication
# ========================================================
......
......@@ -3,6 +3,7 @@
# Defines LDAP Server:
ldap.server=ldap://urquell:389
#ldap.server=ldap://localhost:389
# Defines LDAP Base:
ldap.base=dc=c3local
\ No newline at end of file
......@@ -10,16 +10,8 @@
<sec:authorize access="hasAnyRole('Aluno')">
<menu:category id="c_registration" z="4zf7yvK7ho0iT0xmOM9TE/tFNtY=">
<menu:item id="i_registration_list" messageCode="global_menu_statement" url="/registrations/registrationsstatement" z="user-managed"/>
<menu:item id="i_registration_list" messageCode="global_menu_statement_acceptance" url="/registrations/acceptancestatement" z="user-managed"/>
<menu:item id="i_registration_list" messageCode="global_menu_registration_overview" url="/registrations/regoverviewchoice" z="user-managed"/>
</menu:category>
<menu:category id="c_transcript" z="a8v3h7EFS5CVeUqTWiTRDpYXXJg=">
<menu:item id="i_transcript_list" messageCode="global_menu_history" url="/transcripts/transcriptshistory" z="user-managed"/>
</menu:category>
<menu:category id="c_studentgrant" z="ekB+LoI15aV+Inz9R2XIzu6kQxY=">
<menu:item id="i_studentgrant_list" messageCode="global_menu_statement_student_grant" url="/studentgrants/statementgrant" z="user-managed"/>
</menu:category>
</sec:authorize>
<sec:authorize access="hasAnyRole('Professor')">
......
......@@ -8,7 +8,7 @@ AjaxSolr.theme.prototype.result = function (doc, snippet) {
};
AjaxSolr.theme.prototype.snippet = function (doc) {
var textLength = 400;
var textLength = 1000;
var basePath = '/search_sapos/atas/';
var output = '';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment