Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/Evolveum/midpoint
- Loading branch information
Showing
18 changed files
with
190 additions
and
38 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
...n-gui/src/main/java/com/evolveum/midpoint/web/component/SecurityContextAwareCallable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright (c) 2010-2014 Evolveum | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.evolveum.midpoint.web.component; | ||
|
||
import com.evolveum.midpoint.security.api.SecurityEnforcer; | ||
import org.apache.commons.lang.Validate; | ||
import org.springframework.security.core.Authentication; | ||
|
||
import java.util.concurrent.Callable; | ||
|
||
/** | ||
* @author lazyman | ||
*/ | ||
public abstract class SecurityContextAwareCallable<V> implements Callable<V> { | ||
|
||
private SecurityEnforcer enforcer; | ||
private Authentication authentication; | ||
|
||
protected SecurityContextAwareCallable(SecurityEnforcer enforcer, Authentication authentication) { | ||
Validate.notNull(enforcer, "Security enforcer must not be null."); | ||
|
||
this.enforcer = enforcer; | ||
this.authentication = authentication; | ||
} | ||
|
||
@Override | ||
public final V call() throws Exception { | ||
enforcer.setupPreAuthenticatedSecurityContext(authentication); | ||
|
||
try { | ||
return callWithContextPrepared(); | ||
} finally { | ||
enforcer.setupPreAuthenticatedSecurityContext((Authentication) null); | ||
//todo cleanup security context | ||
} | ||
} | ||
|
||
public abstract V callWithContextPrepared() throws Exception; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 14 additions & 5 deletions
19
gui/admin-gui/src/main/resources/initial-objects/100-report-reconciliation.xml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+3.5 KB
(100%)
samples/model-client-sample-dotnet/ModelClientSample/ModelClientSample.v11.suo
Binary file not shown.