[REDBACK-298] Concurrent modification to roles in Redback can cause incorrect
results to get cached git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1371658 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
83d4f636d2
commit
e5af660c27
|
@ -208,7 +208,7 @@ public class CachedRbacManager
|
||||||
* @see org.apache.archiva.redback.rbac.RBACManager#getAssignedPermissionMap(java.lang.String)
|
* @see org.apache.archiva.redback.rbac.RBACManager#getAssignedPermissionMap(java.lang.String)
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings( "unchecked" )
|
@SuppressWarnings( "unchecked" )
|
||||||
public Map getAssignedPermissionMap( String principal )
|
public synchronized Map getAssignedPermissionMap( String principal )
|
||||||
throws RbacObjectNotFoundException, RbacManagerException
|
throws RbacObjectNotFoundException, RbacManagerException
|
||||||
{
|
{
|
||||||
Object el = userPermissionsCache.get( principal );
|
Object el = userPermissionsCache.get( principal );
|
||||||
|
@ -666,7 +666,7 @@ public class CachedRbacManager
|
||||||
return this.rbacImpl.saveResource( resource );
|
return this.rbacImpl.saveResource( resource );
|
||||||
}
|
}
|
||||||
|
|
||||||
public Role saveRole( Role role )
|
public synchronized Role saveRole( Role role )
|
||||||
throws RbacObjectInvalidException, RbacManagerException
|
throws RbacObjectInvalidException, RbacManagerException
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -692,7 +692,7 @@ public class CachedRbacManager
|
||||||
return this.rbacImpl.saveRole( role );
|
return this.rbacImpl.saveRole( role );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveRoles( Collection<Role> roles )
|
public synchronized void saveRoles( Collection<Role> roles )
|
||||||
throws RbacObjectInvalidException, RbacManagerException
|
throws RbacObjectInvalidException, RbacManagerException
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue