提交 ec91933f 编写于 作者: K Kohsuke Kawaguchi

Minor edits based on review comments

上级 b7027563
......@@ -1180,6 +1180,8 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
/**
* Let the identity determined by {@link ProjectAuthenticator}.
*
* @since 1.520
*/
public Authentication getIdentity() {
return ProjectAuthenticatorConfiguration.get().authenticate(this);
......
......@@ -7,6 +7,8 @@ import hudson.model.AbstractProject;
import hudson.security.ACL;
import org.acegisecurity.Authentication;
import javax.annotation.CheckForNull;
/**
* Extension point to run {@link AbstractBuild}s under a specific identity for better access control.
*
......@@ -28,7 +30,7 @@ public abstract class ProjectAuthenticator extends AbstractDescribableImpl<Proje
* the executor. If everything fails, fall back to the historical behaviour of
* {@link ACL#SYSTEM}.
*/
public abstract Authentication authenticate(AbstractProject<?,?> project);
public abstract @CheckForNull Authentication authenticate(AbstractProject<?,?> project);
@Override
public ProjectAuthenticatorDescriptor getDescriptor() {
......
......@@ -17,6 +17,7 @@ import java.io.IOException;
* Show the {@link ProjectAuthenticator} configurations on the system config page.
*
* @author Kohsuke Kawaguchi
* @since 1.520
*/
@Extension
public class ProjectAuthenticatorConfiguration extends GlobalConfiguration {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册