提交 902f5eb3 编写于 作者: K kohsuke

security setting is now tri-state.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6064 71c3de6d-444a-0410-be80-ed276b4c234a
上级 60195378
......@@ -124,10 +124,11 @@ public final class Hudson extends View implements ItemGroup<TopLevelItem>, Node
/**
* False to enable anyone to do anything.
* Left as a field so that we can still read old data that uses this flag.
* @deprecated as of 1.160.
* @see #security
*/
private transient Boolean useSecurity;
private Boolean useSecurity;
/**
* Hudson's security mode.
......@@ -798,15 +799,30 @@ public final class Hudson extends View implements ItemGroup<TopLevelItem>, Node
return ClockDifference.ZERO;
}
/**
* @deprecated
* Use {@link #getSecurity()} instead.
*/
public boolean isUseSecurity() {
return security != SecurityMode.UNSECURED;
}
@Deprecated
/**
* @deprecated
* Use {@link #setSecurity(SecurityMode)} instead.
*/
public void setUseSecurity(boolean useSecurity) {
this.security = useSecurity ? SecurityMode.LEGACY : SecurityMode.UNSECURED;
}
public SecurityMode getSecurity() {
return security;
}
public void setSecurity(SecurityMode security) {
this.security = security;
}
/**
* Returns true if Hudson is quieting down.
* <p>
......@@ -1156,6 +1172,7 @@ public final class Hudson extends View implements ItemGroup<TopLevelItem>, Node
req.setCharacterEncoding("UTF-8");
useSecurity = null;
security = req.getParameter("use_security")!=null ? SecurityMode.LEGACY : SecurityMode.UNSECURED;
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册