hudson.Functions.isArtifactsPermissionEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(87)

本文整理了Java中hudson.Functions.isArtifactsPermissionEnabled()方法的一些代码示例,展示了Functions.isArtifactsPermissionEnabled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Functions.isArtifactsPermissionEnabled()方法的具体详情如下:
包路径:hudson.Functions
类名称:Functions
方法名:isArtifactsPermissionEnabled

Functions.isArtifactsPermissionEnabled介绍

[英]Returns true if the Run#ARTIFACTS permission is enabled, false otherwise.

When the Run#ARTIFACTS permission is not turned on using the hudson.security.ArtifactsPermission, this permission must not be considered to be set to false for every user. It must rather be like if the permission doesn't exist at all (which means that every user has to have an access to the artifacts but the permission can't be configured in the security screen). Got it?
[中]如果启用了运行工件权限,则返回true,否则返回false。
未使用hudson打开“运行工件”权限时。安全ArtifactsPermission,对于每个用户,此权限不得被视为设置为false。这一定很像权限根本不存在(这意味着每个用户都必须有权访问工件,但权限不能在安全屏幕中配置)。知道了?

代码示例

代码示例来源:origin: jenkinsci/jenkins

/**
 * Serves the artifacts.
 * @throws AccessDeniedException Access denied
 */
public @Nonnull DirectoryBrowserSupport doArtifact() {
  if(Functions.isArtifactsPermissionEnabled()) {
   checkPermission(ARTIFACTS);
  }
  return new DirectoryBrowserSupport(this, getArtifactManager().root(), Messages.Run_ArtifactsBrowserTitle(project.getDisplayName(), getDisplayName()), "package.png", true);
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

/**
 * Serves the artifacts.
 * @throws AccessDeniedException Access denied
 */
public @Nonnull DirectoryBrowserSupport doArtifact() {
  if(Functions.isArtifactsPermissionEnabled()) {
   checkPermission(ARTIFACTS);
  }
  return new DirectoryBrowserSupport(this, getArtifactManager().root(), Messages.Run_ArtifactsBrowserTitle(project.getDisplayName(), getDisplayName()), "package.png", true);
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

/**
 * Serves the artifacts.
 */
public DirectoryBrowserSupport doArtifact() {
  if (Functions.isArtifactsPermissionEnabled()) {
    checkPermission(ARTIFACTS);
  }
  return new DirectoryBrowserSupport(this, new FilePath(getArtifactsDir()), project.getDisplayName() + ' ' + getDisplayName(), "package.png", true);
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

/**
 * Serves the artifacts.
 */
public DirectoryBrowserSupport doArtifact() {
  if(Functions.isArtifactsPermissionEnabled()) {
   checkPermission(ARTIFACTS);
  }
  return new DirectoryBrowserSupport(this,new FilePath(getArtifactsDir()), project.getDisplayName()+' '+getDisplayName(), "package.gif", true);
}

代码示例来源:origin: hudson/hudson-2.x

/**
 * Serves the artifacts.
 */
public DirectoryBrowserSupport doArtifact() {
  if(Functions.isArtifactsPermissionEnabled()) {
   checkPermission(ARTIFACTS);
  }
  return new DirectoryBrowserSupport(this,new FilePath(getArtifactsDir()), project.getDisplayName()+' '+getDisplayName(), "package.gif", true);
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

/**
 * Serves the artifacts.
 */
public DirectoryBrowserSupport doArtifact() {
  if(Functions.isArtifactsPermissionEnabled()) {
   checkPermission(ARTIFACTS);
  }
  return new DirectoryBrowserSupport(this,new FilePath(getArtifactsDir()), project.getDisplayName()+' '+getDisplayName(), "package.png", true);
}

相关文章

微信公众号

最新文章

更多