本文整理了Java中hudson.model.Hudson.isAdmin()
方法的一些代码示例,展示了Hudson.isAdmin()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hudson.isAdmin()
方法的具体详情如下:
包路径:hudson.model.Hudson
类名称:Hudson
方法名:isAdmin
[英]Checks if the current user (for which we are processing the current request) has the admin access.
[中]检查当前用户(我们正在处理当前请求)是否具有管理员权限。
代码示例来源:origin: jenkinsci/jenkins
/**
* @deprecated since 2007-12-18.
* Define a custom {@link hudson.security.Permission} and check against ACL.
* See {@link #isAdmin()} for more instructions.
*/
@Deprecated
public static boolean isAdmin(StaplerRequest req) {
return isAdmin();
}
代码示例来源:origin: jenkinsci/jenkins
/**
* @deprecated since 2007-12-18.
* Use {@link #checkPermission(hudson.security.Permission)}
*/
@Deprecated
public static boolean adminCheck(StaplerRequest req,StaplerResponse rsp) throws IOException {
if (isAdmin(req)) return true;
rsp.sendError(StaplerResponse.SC_FORBIDDEN);
return false;
}
代码示例来源:origin: hudson/hudson-2.x
/**
* @deprecated since 2007-12-18.
* Define a custom {@link Permission} and check against ACL.
* See {@link #isAdmin()} for more instructions.
*/
public static boolean isAdmin(StaplerRequest req) {
return isAdmin();
}
/**
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* @deprecated since 2007-12-18. Define a custom {@link Permission} and
* check against ACL. See {@link #isAdmin()} for more instructions.
*/
public static boolean isAdmin(StaplerRequest req) {
return isAdmin();
}
/**
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* @deprecated since 2007-12-18.
* Define a custom {@link Permission} and check against ACL.
* See {@link #isAdmin()} for more instructions.
*/
public static boolean isAdmin(StaplerRequest req) {
return isAdmin();
}
/**
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* @deprecated since 2007-12-18.
* Define a custom {@link Permission} and check against ACL.
* See {@link #isAdmin()} for more instructions.
*/
public static boolean isAdmin(StaplerRequest req) {
return isAdmin();
}
/**
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* @deprecated since 2007-12-18.
* Define a custom {@link hudson.security.Permission} and check against ACL.
* See {@link #isAdmin()} for more instructions.
*/
@Deprecated
public static boolean isAdmin(StaplerRequest req) {
return isAdmin();
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* @deprecated since 2007-12-18.
* Use {@link #checkPermission(Permission)}
*/
public static boolean adminCheck(StaplerRequest req, StaplerResponse rsp) throws IOException {
if (isAdmin(req)) {
return true;
}
rsp.sendError(StaplerResponse.SC_FORBIDDEN);
return false;
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* @deprecated since 2007-12-18.
* Use {@link #checkPermission(Permission)}
*/
public static boolean adminCheck(StaplerRequest req, StaplerResponse rsp) throws IOException {
if (isAdmin(req)) {
return true;
}
rsp.sendError(StaplerResponse.SC_FORBIDDEN);
return false;
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* @deprecated since 2007-12-18. Use {@link #checkPermission(Permission)}
*/
public static boolean adminCheck(StaplerRequest req, StaplerResponse rsp) throws IOException {
if (isAdmin(req)) {
return true;
}
rsp.sendError(StaplerResponse.SC_FORBIDDEN);
return false;
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* @deprecated since 2007-12-18.
* Use {@link #checkPermission(hudson.security.Permission)}
*/
@Deprecated
public static boolean adminCheck(StaplerRequest req,StaplerResponse rsp) throws IOException {
if (isAdmin(req)) return true;
rsp.sendError(StaplerResponse.SC_FORBIDDEN);
return false;
}
代码示例来源:origin: hudson/hudson-2.x
/**
* @deprecated since 2007-12-18.
* Use {@link #checkPermission(Permission)}
*/
public static boolean adminCheck(StaplerRequest req, StaplerResponse rsp) throws IOException {
if (isAdmin(req)) {
return true;
}
rsp.sendError(StaplerResponse.SC_FORBIDDEN);
return false;
}
内容来源于网络,如有侵权,请联系作者删除!