| | |
| | | */
|
| | | package com.gitblit.tests;
|
| | |
|
| | | import static org.junit.Assert.assertEquals;
|
| | | import static org.junit.Assert.assertNotNull;
|
| | | import static org.junit.Assert.assertNull;
|
| | | import static org.junit.Assert.assertTrue;
|
| | |
|
| | | import java.io.IOException;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Collection;
|
| | |
| | | import com.gitblit.Constants.AuthorizationControl;
|
| | | import com.gitblit.Constants.PermissionType;
|
| | | import com.gitblit.Constants.RegistrantType;
|
| | | import com.gitblit.GitBlitException.NotAllowedException;
|
| | | import com.gitblit.GitBlitException.ForbiddenException;
|
| | | import com.gitblit.GitBlitException.UnauthorizedException;
|
| | | import com.gitblit.Keys;
|
| | | import com.gitblit.RpcServlet;
|
| | | import com.gitblit.models.FederationModel;
|
| | | import com.gitblit.models.FederationProposal;
|
| | | import com.gitblit.models.FederationSet;
|
| | |
| | | import com.gitblit.models.ServerStatus;
|
| | | import com.gitblit.models.TeamModel;
|
| | | import com.gitblit.models.UserModel;
|
| | | import com.gitblit.servlet.RpcServlet;
|
| | | import com.gitblit.utils.RpcUtils;
|
| | |
|
| | | /**
|
| | |
| | | * @author James Moger
|
| | | *
|
| | | */
|
| | | public class RpcTests {
|
| | | public class RpcTests extends GitblitUnitTest {
|
| | |
|
| | | String url = GitBlitSuite.url;
|
| | | String account = GitBlitSuite.account;
|
| | |
| | | UserModel user = null;
|
| | | try {
|
| | | user = RpcUtils.getUser("admin", url, null, null);
|
| | | } catch (NotAllowedException e) {
|
| | | } catch (ForbiddenException e) {
|
| | | }
|
| | | assertNull("Server allows anyone to get user!", user);
|
| | |
|