aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-web-common/src
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2016-10-25 22:43:09 +0200
committerMartin Stockhammer <martin_s@apache.org>2016-10-25 22:43:09 +0200
commit593d69f52eae0b0187a817212c29388968a2add8 (patch)
treecc7b9d9d567e2fa49cf92243fb56f703b01edc5b /archiva-modules/archiva-web/archiva-web-common/src
parent49323248e413901a881936be824a03292f9302fe (diff)
downloadarchiva-593d69f52eae0b0187a817212c29388968a2add8.tar.gz
archiva-593d69f52eae0b0187a817212c29388968a2add8.zip
Add cache reset after configuration save
Diffstat (limited to 'archiva-modules/archiva-web/archiva-web-common/src')
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java
index 143f3c21b..6b2eb9e8f 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java
@@ -98,6 +98,8 @@ public class ArchivaRbacManager
List<String> rbacManagerIds =
redbackRuntimeConfigurationAdmin.getRedbackRuntimeConfiguration().getRbacManagerImpls();
+ clearCaches();
+
if ( rbacManagerIds.isEmpty() )
{
rbacManagerIds.add( RedbackRuntimeConfigurationAdmin.DEFAULT_RBAC_MANAGER_IMPL );
@@ -113,6 +115,7 @@ public class ArchivaRbacManager
rbacManagersPerId.put( id, rbacManager );
}
+
}
catch ( RepositoryAdminException e )
{
@@ -122,12 +125,23 @@ public class ArchivaRbacManager
}
}
+ private void clearCaches() {
+ resourcesCache.clear();
+ operationsCache.clear();
+ permissionsCache.clear();
+ rolesCache.clear();
+ userAssignmentsCache.clear();
+ userPermissionsCache.clear();
+ effectiveRoleSetCache.clear();
+ }
+
protected RBACManager getRbacManagerForWrite()
{
for ( RBACManager rbacManager : this.rbacManagersPerId.values() )
{
if ( !rbacManager.isReadOnly() )
{
+ log.debug("Writable Rbac manager {}", rbacManager.getDescriptionKey());
return rbacManager;
}
}