fix error update postgresql database owner
This commit is contained in:
parent
fde6cbd9cd
commit
c0413f7deb
@ -75,8 +75,8 @@ public class PgSqlDatabaseModuleImpl extends AbstractModuleImpl {
|
|||||||
Transaction transaction = getTransaction();
|
Transaction transaction = getTransaction();
|
||||||
EntityManager em = transaction.getEntityManager();
|
EntityManager em = transaction.getEntityManager();
|
||||||
UnixUser unixUser = transaction.getLoginUser();
|
UnixUser unixUser = transaction.getLoginUser();
|
||||||
MySqlDatabase detachtedDB = (MySqlDatabase) existingEntity;
|
PgSqlDatabase detachtedDB = (PgSqlDatabase) existingEntity;
|
||||||
MySqlDatabase attachedDB = em.find(MySqlDatabase.class, detachtedDB.getId());
|
PgSqlDatabase attachedDB = em.find(PgSqlDatabase.class, detachtedDB.getId());
|
||||||
if (!attachedDB.getName().equals(detachtedDB.getName())) {
|
if (!attachedDB.getName().equals(detachtedDB.getName())) {
|
||||||
throw new AuthorisationException(unixUser, "update", existingEntity, "name");
|
throw new AuthorisationException(unixUser, "update", existingEntity, "name");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user