Commit b021e02c authored by David Hoksza's avatar David Hoksza
Browse files

getOther returns everything when no parameters provided. Logging of privileges...

getOther returns everything when no parameters provided. Logging of privileges check. Permision for plugins directory.
parent 2a99d60a
......@@ -106,7 +106,7 @@ BioEntity.prototype.getType = function() {
BioEntity.prototype.getOther = function(type) {
if (this._other !== undefined) {
return this._other[type];
return (type === undefined) ? this._other : this._other[type];
}
};
......
......@@ -200,7 +200,7 @@
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</prop>
<!--<prop key="hibernate.show_sql">true</prop>-->
<prop key="hibernate.show_sql">false</prop>
<!--<prop key="hibernate.current_session_context_class">thread</prop>-->
<!--<prop key="hibernate.hbm2ddl.auto">create</prop> -->
......
......@@ -300,11 +300,16 @@ public class UserService implements IUserService {
if (type.getPrivilegeClassType() != BasicPrivilege.class) {
throw new InvalidArgumentException("This privilege requires additional information");
}
logger.debug("SEARCHING FOR privilege: "+type);
logger.debug("Searching for user: "+user.getLogin());
for (BasicPrivilege privilege : user.getPrivileges()) {
logger.debug("Found: "+privilege.getType()+", "+privilege.getLevel());
if (privilege.getType().equals(type)) {
logger.debug("RETURN "+privilege.getLevel());
return privilege.getLevel();
}
}
logger.debug("RETURN 0");
return 0;
}
......
......@@ -35,6 +35,8 @@
<security:intercept-url pattern="/fonts/**" access="permitAll"/>
<security:intercept-url pattern="/plugins/**" access="permitAll"/>
<security:intercept-url pattern="/**" access="isAuthenticated()"/>
<security:logout logout-url="/j_spring_security_logout" logout-success-url="/login.xhtml" invalidate-session="true"/>
......
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