From 4fa8cadae774c7b6b2c0d6fd576c09d78594d46b Mon Sep 17 00:00:00 2001 From: Josef Rokos Date: Fri, 18 Jul 2014 14:54:54 +0200 Subject: [PATCH] =?UTF-8?q?Opraven=20NullPointerException=20ve=20t=C5=99?= =?UTF-8?q?=C3=ADd=C4=9B=20pro=20kontrolu=20pr=C3=A1v.V=C3=BDjimka=20vyska?= =?UTF-8?q?kovala=20kdy=C5=BE=20m=C4=9Bl=20u=C5=BEivatel=20pr=C3=A1va=20ke?= =?UTF-8?q?=20st=C5=99edisku=20pouze=20p=C5=99es=20vlo=C5=BEenou=20komisi.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bukova/isspst/security/IsspstPermissionEvaluator.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/info/bukova/isspst/security/IsspstPermissionEvaluator.java b/src/main/java/info/bukova/isspst/security/IsspstPermissionEvaluator.java index 8dc534ff..6b118cbd 100644 --- a/src/main/java/info/bukova/isspst/security/IsspstPermissionEvaluator.java +++ b/src/main/java/info/bukova/isspst/security/IsspstPermissionEvaluator.java @@ -76,6 +76,11 @@ public class IsspstPermissionEvaluator implements PermissionEvaluator { for (Workgroup wg : userWorkgroups) { List wgRoles = wgService.getUserWorkgroupRoles(wg, user); + + if (wgRoles == null) { + continue; + } + for (Role r : wgRoles) { for (Permission p : r.getPermissions()) { if (p.getAuthority().equals(permission.getAuthority())) {