@ RequirePOST public void doCreateFirstAccount ( StaplerRequest req , StaplerResponse rsp ) throws IOException , ServletException { if ( hasSomeUser ( ) ) { rsp . sendError ( SC_UNAUTHORIZED , "First user was already created" ) ; return ; } User u = createAccount ( req , rsp , false , "firstUser.jelly" ) ; if ( u != null ) { tryToMakeAdmin ( u ) ; loginAndTakeBack ( req , rsp , u ) ; } }
Creates a first admin user account .