Skip to content
Snippets Groups Projects
Unverified Commit 5fd0aae6 authored by ThanKarab's avatar ThanKarab Committed by GitHub
Browse files

Fix for showing experiment on admin users.

parent e0eb3f15
No related branches found
No related tags found
1 merge request!50Fix for showing experiment on admin users.
......@@ -124,11 +124,11 @@ public class ExperimentService {
logger.LogUserAction("Loading Experiment with uuid : " + uuid);
experimentDAO = experimentRepository.loadExperiment(uuid, logger);
if (
!experimentDAO.isShared()
&& !experimentDAO.getCreatedBy().getUsername().equals(user.getUsername())
&& authenticationIsEnabled
&& ClaimUtils.validateAccessRightsOnExperiments(authentication, logger)
if (
authenticationIsEnabled
&& !experimentDAO.isShared()
&& !experimentDAO.getCreatedBy().getUsername().equals(user.getUsername())
&& !ClaimUtils.validateAccessRightsOnExperiments(authentication, logger)
) {
logger.LogUserAction("Accessing Experiment is unauthorized.");
throw new UnauthorizedException("You don't have access to the experiment.");
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment