Skip to content
Snippets Groups Projects
Verified Commit 3116b670 authored by Martin Weise's avatar Martin Weise
Browse files
parent 41d8d46b
Branches
Tags
1 merge request!411WIP
...@@ -4,6 +4,10 @@ author: Martin Weise ...@@ -4,6 +4,10 @@ author: Martin Weise
## v1.8.2 (2025-04-23) ## v1.8.2 (2025-04-23)
#### Fixes
* Fixed a bug in the UI where the resource status was displayed as identifier when a draft identifier has been created.
#### Features #### Features
* Added structured logging through the `fluentd` protocol via the lightweight fluentbit in a * Added structured logging through the `fluentd` protocol via the lightweight fluentbit in a
......
...@@ -11,6 +11,9 @@ import java.util.UUID; ...@@ -11,6 +11,9 @@ import java.util.UUID;
@Repository @Repository
public interface IdentifierRepository extends JpaRepository<Identifier, UUID> { public interface IdentifierRepository extends JpaRepository<Identifier, UUID> {
@NotNull
List<Identifier> findAll();
/** /**
* Finds identifiers by given database id. * Finds identifiers by given database id.
* *
......
...@@ -13,6 +13,7 @@ import org.apache.commons.codec.digest.DigestUtils; ...@@ -13,6 +13,7 @@ import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.RandomStringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.List; import java.util.List;
...@@ -33,11 +34,13 @@ public class UserServiceImpl implements UserService { ...@@ -33,11 +34,13 @@ public class UserServiceImpl implements UserService {
} }
@Override @Override
@Transactional(readOnly = true)
public List<User> findAll() { public List<User> findAll() {
return userRepository.findAll(); return userRepository.findAll();
} }
@Override @Override
@Transactional(readOnly = true)
public User findByUsername(String username) throws UserNotFoundException { public User findByUsername(String username) throws UserNotFoundException {
final Optional<User> optional = userRepository.findByUsername(username); final Optional<User> optional = userRepository.findByUsername(username);
if (optional.isEmpty()) { if (optional.isEmpty()) {
...@@ -48,11 +51,13 @@ public class UserServiceImpl implements UserService { ...@@ -48,11 +51,13 @@ public class UserServiceImpl implements UserService {
} }
@Override @Override
@Transactional(readOnly = true)
public List<User> findAllInternalUsers() { public List<User> findAllInternalUsers() {
return userRepository.findAllInternal(); return userRepository.findAllInternal();
} }
@Override @Override
@Transactional(readOnly = true)
public User findById(UUID id) throws UserNotFoundException { public User findById(UUID id) throws UserNotFoundException {
final Optional<User> optional = userRepository.findById(id); final Optional<User> optional = userRepository.findById(id);
if (optional.isEmpty()) { if (optional.isEmpty()) {
...@@ -63,6 +68,7 @@ public class UserServiceImpl implements UserService { ...@@ -63,6 +68,7 @@ public class UserServiceImpl implements UserService {
} }
@Override @Override
@Transactional
public User create(CreateUserDto data) { public User create(CreateUserDto data) {
/* create at authentication service */ /* create at authentication service */
final String passwordHash = "*" + DigestUtils.sha1Hex(DigestUtils.sha1(RandomStringUtils.randomAlphabetic(40) final String passwordHash = "*" + DigestUtils.sha1Hex(DigestUtils.sha1(RandomStringUtils.randomAlphabetic(40)
...@@ -86,6 +92,7 @@ public class UserServiceImpl implements UserService { ...@@ -86,6 +92,7 @@ public class UserServiceImpl implements UserService {
} }
@Override @Override
@Transactional
public User modify(User user, UserUpdateDto data) throws UserNotFoundException, AuthServiceException { public User modify(User user, UserUpdateDto data) throws UserNotFoundException, AuthServiceException {
user.setFirstname(data.getFirstname()); user.setFirstname(data.getFirstname());
user.setLastname(data.getLastname()); user.setLastname(data.getLastname());
......
...@@ -16,7 +16,11 @@ ...@@ -16,7 +16,11 @@
</template> </template>
<script> <script>
<<<<<<< Updated upstream
import { useCacheStore } from '~/stores/cache.js'; import { useCacheStore } from '~/stores/cache.js';
=======
import { useCacheStore } from '@/stores/cache.js'
>>>>>>> Stashed changes
export default { export default {
props: { props: {
...@@ -65,7 +69,11 @@ export default { ...@@ -65,7 +69,11 @@ export default {
return this.cacheStore.getUser return this.cacheStore.getUser
}, },
hasIdentifier () { hasIdentifier () {
<<<<<<< Updated upstream
if (!this.resource.identifiers) { if (!this.resource.identifiers) {
=======
if (!this.resource.identifiers || this.resource.identifiers.length === 0) {
>>>>>>> Stashed changes
return false return false
} }
if (!this.cacheUser) { if (!this.cacheUser) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment