@Override public boolean canEdit(ProjectEntity entity, SecurityService securityService) { return securityService.isProjectFunctionGranted(entity.projectId(), ProjectConfig.class); }
@Override public boolean canView(ProjectEntity entity, SecurityService securityService) { return securityService.isProjectFunctionGranted(entity.projectId(), ProjectConfig.class); }
default LinksBuilder link(String name, Object methodInvocation, Class<? extends ProjectFunction> fn, ProjectEntity projectEntity) { return link(name, methodInvocation, fn, projectEntity.projectId()); }
/** * Checks if the <code>fn</code> function is granted for the current user * for the <code>projectEntity</code>'s project. */ default boolean isProjectFunctionGranted(ProjectEntity projectEntity, Class<? extends ProjectFunction> fn) { return isProjectFunctionGranted(projectEntity.projectId(), fn); }
/** * Only granted for project configurators. */ @Override public boolean canEdit(ProjectEntity entity, SecurityService securityService) { return securityService.isProjectFunctionGranted(entity.projectId(), ProjectConfig.class); }
public T with(ProjectEntity e, Class<? extends ProjectFunction> fn) { return with(e.projectId(), fn); }
@Override public boolean canEdit(ProjectEntity entity, SecurityService securityService) { return securityService.isProjectFunctionGranted(entity.projectId(), ProjectConfig.class); }
@Override public boolean canEdit(ProjectEntity entity, SecurityService securityService) { return securityService.isProjectFunctionGranted(entity.projectId(), ProjectConfig.class); }
@Override public boolean canEdit(ProjectEntity entity, SecurityService securityService) { return securityService.isProjectFunctionGranted(entity.projectId(), ProjectConfig.class); }
@Override public boolean canEdit(ProjectEntity entity, SecurityService securityService) { return securityService.isProjectFunctionGranted(entity.projectId(), ProjectConfig.class); }
@Override public boolean canEdit(ProjectEntity entity, SecurityService securityService) { return securityService.isProjectFunctionGranted(entity.projectId(), ProjectConfig.class); }
default void checkProjectFunction(ProjectEntity entity, Class<? extends ProjectFunction> fn) { checkProjectFunction(entity.projectId(), fn); }
default boolean isProjectFunctionGranted(ProjectEntity entity, Class<? extends ProjectFunction> fn) { return isProjectFunctionGranted(entity.projectId(), fn); }
/** * One can edit the SVN configuration of a branch only if he can configurure a project and if the project * is itself configured with SVN. */ @Override public boolean canEdit(ProjectEntity entity, SecurityService securityService) { return securityService.isProjectFunctionGranted(entity.projectId(), ProjectConfig.class) && propertyService.hasProperty( entity.getProject(), SVNProjectConfigurationPropertyType.class); }
protected <T> T view(ProjectEntity projectEntity, Callable<T> callable) throws Exception { return asUser().with(projectEntity.projectId(), ProjectView.class).call(callable); }