mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 22:45:45 +01:00
Start entity types with a capital char
This commit is contained in:
@@ -85,7 +85,7 @@ public class FileHistoryRootResource {
|
||||
} else {
|
||||
String message = String.format("for the revision %s and the file %s there are no changesets", revision, path);
|
||||
log.error(message);
|
||||
throw notFound(entity("path", path).in("revision", revision).in(namespaceAndName));
|
||||
throw notFound(entity("Path", path).in("revision", revision).in(namespaceAndName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ public class RepositoryPermissionRootResource {
|
||||
*/
|
||||
private void checkPermissionAlreadyExists(RepositoryPermissionDto permission, Repository repository) {
|
||||
if (isPermissionExist(permission, repository)) {
|
||||
throw alreadyExists(entity("permission", permission.getName()).in(repository));
|
||||
throw alreadyExists(entity("Permission", permission.getName()).in(repository));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ public class SourceRootResource {
|
||||
if (browserResult != null) {
|
||||
return Response.ok(browserResultToFileObjectDtoMapper.map(browserResult, namespaceAndName)).build();
|
||||
} else {
|
||||
throw notFound(entity("sources", path).in(namespaceAndName));
|
||||
throw notFound(entity("Source", path).in(namespaceAndName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public class PermissionAssigner {
|
||||
private Predicate<PermissionDescriptor> permissionExists(Collection<PermissionDescriptor> availablePermissions, Collection<AssignedPermission> existingPermissions) {
|
||||
return p -> {
|
||||
if (!availablePermissions.contains(p) && existingPermissions.stream().map(AssignedPermission::getPermission).noneMatch(e -> e.equals(p))) {
|
||||
throw NotFoundException.notFound(ContextEntry.ContextBuilder.entity("permission", p.getValue()));
|
||||
throw NotFoundException.notFound(ContextEntry.ContextBuilder.entity("Permission", p.getValue()));
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
@@ -403,7 +403,7 @@ public class DefaultUserManager extends AbstractUserManager
|
||||
User user = get((String) SecurityUtils.getSubject().getPrincipals().getPrimaryPrincipal());
|
||||
|
||||
if (!user.getPassword().equals(oldPassword)) {
|
||||
throw new InvalidPasswordException(ContextEntry.ContextBuilder.entity("passwordChange", "-").in(User.class, user.getName()));
|
||||
throw new InvalidPasswordException(ContextEntry.ContextBuilder.entity("PasswordChange", "-").in(User.class, user.getName()));
|
||||
}
|
||||
|
||||
user.setPassword(newPassword);
|
||||
@@ -422,7 +422,7 @@ public class DefaultUserManager extends AbstractUserManager
|
||||
throw new NotFoundException(User.class, userId);
|
||||
}
|
||||
if (!isTypeDefault(user)) {
|
||||
throw new ChangePasswordNotAllowedException(ContextEntry.ContextBuilder.entity("passwordChange", "-").in(User.class, user.getName()), user.getType());
|
||||
throw new ChangePasswordNotAllowedException(ContextEntry.ContextBuilder.entity("PasswordChange", "-").in(User.class, user.getName()), user.getType());
|
||||
}
|
||||
user.setPassword(newPassword);
|
||||
this.modify(user);
|
||||
|
||||
Reference in New Issue
Block a user