| | |
| | | // workaround until get().getUser() is reviewed throughout the app
|
| | | user = UserModel.ANONYMOUS;
|
| | | }
|
| | | boolean canAccess = user.hasBranchPermission(repositoryName,
|
| | | boolean canAccess = user.canView(getRepositoryModel(),
|
| | | branch.reference.getName());
|
| | | if (!canAccess) {
|
| | | error(getString("gb.accessDenied"), true);
|
| | |
| | | RepositoryModel model = GitBlit.self().getRepositoryModel(
|
| | | GitBlitWebSession.get().getUser(), repositoryName);
|
| | | if (model == null) {
|
| | | if (GitBlit.self().hasRepository(repositoryName)) {
|
| | | if (GitBlit.self().hasRepository(repositoryName, true)) {
|
| | | // has repository, but unauthorized
|
| | | authenticationError(getString("gb.unauthorizedAccessForRepository") + " " + repositoryName);
|
| | | } else {
|
| | |
| | | Constants.SearchType searchType) {
|
| | | String name = identity == null ? "" : identity.getName();
|
| | | String address = identity == null ? "" : identity.getEmailAddress();
|
| | | name = StringUtils.removeNewlines(name);
|
| | | address = StringUtils.removeNewlines(address);
|
| | | boolean showEmail = GitBlit.getBoolean(Keys.web.showEmailAddresses, false);
|
| | | if (!showEmail || StringUtils.isEmpty(name) || StringUtils.isEmpty(address)) {
|
| | | String value = name;
|