hudson.model.Hudson.hasPermission()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(200)

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

Hudson.hasPermission介绍

暂无

代码示例

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

public String getIconFileName() {
  if (Hudson.getInstance().hasPermission(Hudson.ADMINISTER)) {
    return "setting.png";
  } else {
    return null;
  }
}

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

public String getIconFileName() {
  if (Hudson.getInstance().hasPermission(Hudson.ADMINISTER))
    return "setting.png";
  else
    return null;
}

代码示例来源:origin: sitespeedio/jenkins.sitespeed.io

public FormValidation doCheckHome(@QueryParameter File value) throws IOException,
  ServletException {
 if (!Hudson.getInstance().hasPermission(Hudson.ADMINISTER)) {
  return FormValidation.ok();
 }
 if (!value.canExecute()) {
  return FormValidation.error("The sitespeed.io binary isn't executable for Jenkins");
 }
 return FormValidation.ok();
}

代码示例来源:origin: org.jvnet.hudson.plugins/perforce

public String getIconFileName() {
  if (tag == null && !Hudson.getInstance().hasPermission(Hudson.ADMINISTER))
    return null;
  return "save.gif";
}

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

public String getIconFileName() {
  if (Hudson.getInstance().hasPermission(Hudson.ADMINISTER))
    return "setting.gif";
  else
    return null;
}

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

@Override
public String getColumnCaption() {
  // Hide this column from non-admins
  return Hudson.getInstance().hasPermission(Hudson.ADMINISTER) ? super.getColumnCaption() : null;
}

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

@Override
public String getColumnCaption() {
  // Hide this column from non-admins
  return Hudson.getInstance().hasPermission(Hudson.ADMINISTER) ? super.getColumnCaption() : null;
}

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

@Override
public String getColumnCaption() {
  // Hide this column from non-admins
  return Hudson.getInstance().hasPermission(Hudson.ADMINISTER) ? super.getColumnCaption() : null;
}
public static final DiskSpaceMonitorDescriptor DESCRIPTOR = new DiskSpaceMonitorDescriptor() {

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

@Override
public String getColumnCaption() {
  // Hide this column from non-admins
  return Hudson.getInstance().hasPermission(Hudson.ADMINISTER) ? super.getColumnCaption() : null;
}
@Extension

代码示例来源:origin: jenkinsci/build-failure-analyzer-plugin

@Override
public String getDisplayName() {
  if (Hudson.getInstance().hasPermission(PluginImpl.UPDATE_PERMISSION)) {
    return Messages.CauseManagement_DisplayName();
  } else if (Hudson.getInstance().hasPermission(PluginImpl.VIEW_PERMISSION)) {
    return Messages.CauseList_DisplayName();
  } else {
    return null;
  }
}

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

@Override
public String getColumnCaption() {
  // Hide this column from non-admins
  return Hudson.getInstance().hasPermission(Hudson.ADMINISTER) ? super.getColumnCaption() : null;
}

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

@Override
public String getColumnCaption() {
  // Hide this column from non-admins
  return Hudson.getInstance().hasPermission(Hudson.ADMINISTER) ? super.getColumnCaption() : null;
}
public static final DiskSpaceMonitorDescriptor DESCRIPTOR = new DiskSpaceMonitorDescriptor() {

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

@Override
public String getColumnCaption() {
  // Hide this column from non-admins
  return Hudson.getInstance().hasPermission(Hudson.ADMINISTER) ? super.getColumnCaption() : null;
}

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

@Override
public String getColumnCaption() {
  // Hide this column from non-admins
  return Hudson.getInstance().hasPermission(Hudson.ADMINISTER) ? super.getColumnCaption() : null;
}

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

@Override
public String getColumnCaption() {
  // Hide this column from non-admins
  return Hudson.getInstance().hasPermission(Hudson.ADMINISTER) ? super.getColumnCaption() : null;
}

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

@Override
public String getColumnCaption() {
  // Hide this column from non-admins
  return Hudson.getInstance().hasPermission(Hudson.ADMINISTER) ? super.getColumnCaption() : null;
}

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

@Override
public String getColumnCaption() {
  // Hide this column from non-admins
  return Hudson.getInstance().hasPermission(Hudson.ADMINISTER) ? super.getColumnCaption() : null;
}

代码示例来源:origin: jenkinsci/gerrit-trigger-plugin

@Override
public String getIconFileName() {
  if (hasEnabledServers() && Hudson.getInstance().hasPermission(PluginImpl.MANUAL_TRIGGER)) {
    return getPluginImageUrl("icon_retrigger24.png");
  } else {
    return null;
  }
}

代码示例来源:origin: jenkinsci/gerrit-trigger-plugin

@Override
public String getDisplayName() {
  if (hasEnabledServers() && Hudson.getInstance().hasPermission(PluginImpl.MANUAL_TRIGGER)) {
    return Messages.ManualGerritTrigger();
  } else {
  return null;
  }
}

代码示例来源:origin: jenkinsci/build-failure-analyzer-plugin

@Override
public String getIconFileName() {
  if (Hudson.getInstance().hasPermission(PluginImpl.UPDATE_PERMISSION)
      && PluginImpl.getInstance().isGraphsEnabled()) {
    return PluginImpl.getDefaultIcon();
  } else {
    return null;
  }
}

相关文章

Hudson类方法