| | |
| | |
|
| | | import com.gitblit.Constants;
|
| | | import com.gitblit.Constants.AccessRestrictionType;
|
| | | import com.gitblit.Constants.AuthorizationControl;
|
| | | import com.gitblit.GitBlitException.ForbiddenException;
|
| | | import com.gitblit.GitBlitException.NotAllowedException;
|
| | | import com.gitblit.GitBlitException.UnauthorizedException;
|
| | |
| | | restriction = settings.get(Keys.git.defaultAccessRestriction).currentValue;
|
| | | }
|
| | | return AccessRestrictionType.fromName(restriction);
|
| | | }
|
| | |
|
| | | public AuthorizationControl getDefaultAuthorizationControl() {
|
| | | String authorization = null;
|
| | | if (settings.hasKey(Keys.git.defaultAuthorizationControl)) {
|
| | | authorization = settings.get(Keys.git.defaultAuthorizationControl).currentValue;
|
| | | }
|
| | | return AuthorizationControl.fromName(authorization);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | public boolean deleteRepository(RepositoryModel repository) throws IOException {
|
| | | return RpcUtils.deleteRepository(repository, url, account, password);
|
| | | }
|
| | | |
| | | public boolean clearRepositoryCache() throws IOException {
|
| | | return RpcUtils.clearRepositoryCache(url, account, password);
|
| | | }
|
| | |
|
| | | public boolean createUser(UserModel user) throws IOException {
|
| | | return RpcUtils.createUser(user, url, account, password);
|