本文整理了Java中hudson.model.Hudson.hasPermission()
方法的一些代码示例,展示了Hudson.hasPermission()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hudson.hasPermission()
方法的具体详情如下:
包路径:hudson.model.Hudson
类名称: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;
}
}
内容来源于网络,如有侵权,请联系作者删除!