/** * @deprecated Use {@link ProjectService#managesAnyProject(User)} */ @Deprecated public static boolean projectSettingsEnabeled(ProjectService repository, User user) { return repository.managesAnyProject(user); }
/** * @deprecated Use {@link ProjectService#managesAnyProject(User)} */ @Deprecated public static boolean projectSettingsEnabeled(ProjectService repository, User user) { return repository.managesAnyProject(user); }
/** * Only admins and project managers can see this page */ @Override public boolean applies() { return projectService.managesAnyProject(userRepo.getCurrentUser()); }
/** * Only admins and project managers can see this page */ @Override public boolean applies() { return projectService.managesAnyProject(userRepo.getCurrentUser()); }
public static boolean adminAreaAccessRequired(UserDao aUserRepo, ProjectService aProjectService) { User user = aUserRepo.getCurrentUser(); // Project managers need access to the admin area to manage projects if (aProjectService.managesAnyProject(user)) { return true; } // Admins need access to the admin area to manage projects if (aUserRepo.isAdministrator(user)) { return true; } // If users are allowed to access their profile information, the also need to access the // admin area. Note: access to the users own profile should be handled differently. List<String> activeProfiles = asList(ApplicationContextProvider.getApplicationContext() .getEnvironment().getActiveProfiles()); Properties settings = SettingsUtil.getSettings(); return !activeProfiles.contains("auto-mode-preauth") && "true" .equals(settings.getProperty(SettingsUtil.CFG_USER_ALLOW_PROFILE_ACCESS)); } }
public static boolean adminAreaAccessRequired(UserDao aUserRepo, ProjectService aProjectService) { User user = aUserRepo.getCurrentUser(); // Project managers need access to the admin area to manage projects if (aProjectService.managesAnyProject(user)) { return true; } // Admins need access to the admin area to manage projects if (aUserRepo.isAdministrator(user)) { return true; } // If users are allowed to access their profile information, the also need to access the // admin area. Note: access to the users own profile should be handled differently. List<String> activeProfiles = asList(ApplicationContextProvider.getApplicationContext() .getEnvironment().getActiveProfiles()); Properties settings = SettingsUtil.getSettings(); return !activeProfiles.contains("auto-mode-preauth") && "true" .equals(settings.getProperty(SettingsUtil.CFG_USER_ALLOW_PROFILE_ACCESS)); } }