boolean canDownload = repositoryEntry.getCanDownload() && handler.supportsDownload();
// disable download for courses if not author or owner
if (repositoryEntry.getOlatResource().getResourceableTypeName().equals(CourseModule.getCourseTypeName())
&& !(isOwner || isAuthor)) canDownload = false;
// always enable download for owners
if (isOwner && handler.supportsDownload()) canDownload = true;
detailsToolC.setEnabled(TOOL_DOWNLOAD, canDownload);
boolean canBookmark = true;
if (BookmarkManager.getInstance().isResourceableBookmarked(ureq.getIdentity(), repositoryEntry) || !repositoryEntry.getCanLaunch())
canBookmark = false;
detailsToolC.setEnabled(TOOL_BOOKMARK, canBookmark);