File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
perun-core/src/main/java/cz/metacentrum/perun/core/blImpl Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -2599,10 +2599,12 @@ public static synchronized void refreshAuthz(PerunSession sess) {
25992599 Map <String , List <String >> appAllowedRoles = BeansUtils .getCoreConfig ().getAppAllowedRoles ();
26002600 for (String reg : appAllowedRoles .keySet ()) {
26012601 Pattern pattern = Pattern .compile (reg );
2602- if (pattern .matcher (sess .getPerunPrincipal ().getReferer ()).matches ()) {
2603- for (String role : roles .getRolesNames ()) {
2604- if (!appAllowedRoles .get (reg ).contains (role )) {
2605- roles .remove (role );
2602+ if (!isBlank (sess .getPerunPrincipal ().getReferer ())) {
2603+ if (pattern .matcher (sess .getPerunPrincipal ().getReferer ()).matches ()) {
2604+ for (String role : roles .getRolesNames ()) {
2605+ if (!appAllowedRoles .get (reg ).contains (role )) {
2606+ roles .remove (role );
2607+ }
26062608 }
26072609 }
26082610 }
You can’t perform that action at this time.
0 commit comments