mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 06:55:47 +01:00
added some comments
This commit is contained in:
@@ -139,9 +139,23 @@ public class ScmRealm extends AuthorizingRealm
|
|||||||
this.groupManager = groupManager;
|
this.groupManager = groupManager;
|
||||||
this.repositoryDAO = repositoryDAO;
|
this.repositoryDAO = repositoryDAO;
|
||||||
this.authenticator = authenticator;
|
this.authenticator = authenticator;
|
||||||
|
|
||||||
|
// init cache
|
||||||
this.cache = cacheManager.getCache(String.class, AuthorizationInfo.class,
|
this.cache = cacheManager.getCache(String.class, AuthorizationInfo.class,
|
||||||
CACHE_NAME);
|
CACHE_NAME);
|
||||||
|
|
||||||
|
// set token class
|
||||||
|
setAuthenticationTokenClass(ScmAuthenticationToken.class);
|
||||||
|
|
||||||
|
// use own custom caching
|
||||||
|
setCachingEnabled(false);
|
||||||
|
setAuthenticationCachingEnabled(false);
|
||||||
|
setAuthorizationCachingEnabled(false);
|
||||||
|
|
||||||
|
// set components
|
||||||
setPermissionResolver(new RepositoryPermissionResolver());
|
setPermissionResolver(new RepositoryPermissionResolver());
|
||||||
|
|
||||||
|
// add listeners for caching
|
||||||
userManager.addListener(this);
|
userManager.addListener(this);
|
||||||
repositoryManager.addListener(this);
|
repositoryManager.addListener(this);
|
||||||
}
|
}
|
||||||
@@ -194,20 +208,6 @@ public class ScmRealm extends AuthorizingRealm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Method description
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @param token
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean supports(AuthenticationToken token)
|
|
||||||
{
|
|
||||||
return token instanceof ScmAuthenticationToken;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method description
|
* Method description
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user