Merge pull request #1414 from scm-manager/bugfix/authorization_events_race_condition

Permission race condition on repository initialization
This commit is contained in:
René Pfeuffer
2020-11-09 17:40:24 +01:00
committed by GitHub
3 changed files with 6 additions and 2 deletions

View File

@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
### Fixed
- Error on repository initialization with least-privilege user ([#1414](https://github.com/scm-manager/scm-manager/pull/1414))
## [2.9.0] - 2020-11-06
### Added
- Tracing api ([#1393](https://github.com/scm-manager/scm-manager/pull/#1393))

View File

@@ -140,7 +140,7 @@ public class AuthorizationChangedEventProducer {
*
* @param event repository event
*/
@Subscribe
@Subscribe(async = false)
public void onEvent(RepositoryEvent event) {
if (event.getEventType().isPost()) {
if (isModificationEvent(event)) {

View File

@@ -295,7 +295,7 @@ public class DefaultAuthorizationCollector implements AuthorizationCollector
//J+
}
@Subscribe
@Subscribe(async = false)
public void invalidateCache(AuthorizationChangedEvent event) {
if (event.isEveryUserAffected()) {
invalidateUserCache(event.getNameOfAffectedUser());