Skip to content

Commit

Permalink
Try to fix problems due to dependency bump
Browse files Browse the repository at this point in the history
  • Loading branch information
SailReal committed Oct 29, 2024
1 parent 5078b24 commit 3937c48
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void syncUpdatedUsers(Map<String, User> keycloakUsers, Map<String, User> databas
dbUser.setPictureUrl(kcUser.getPictureUrl());
dbUser.setName(kcUser.getName());
dbUser.setEmail(kcUser.getEmail());
userRepo.persistAndFlush(dbUser);
userRepo.persist(dbUser);
}
}

Expand All @@ -91,7 +91,7 @@ void syncUpdatedGroups(Map<String, Group> keycloakGroups, Map<String, Group> dat

dbGroup.getMembers().addAll(diff(kcGroup.getMembers(), dbGroup.getMembers()));
dbGroup.getMembers().removeAll(diff(dbGroup.getMembers(), kcGroup.getMembers()));
groupRepo.persistAndFlush(dbGroup);
groupRepo.persist(dbGroup);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
@DiscriminatorValue("GROUP")
public class Group extends Authority {

@ManyToMany(cascade = {CascadeType.MERGE, CascadeType.REFRESH})
@ManyToMany(cascade = {CascadeType.REMOVE})
@JoinTable(name = "group_membership",
joinColumns = @JoinColumn(name = "group_id", referencedColumnName = "id"),
inverseJoinColumns = @JoinColumn(name = "member_id", referencedColumnName = "id")
Expand Down
8 changes: 2 additions & 6 deletions backend/src/main/java/org/cryptomator/hub/entities/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,12 @@ public boolean equals(Object o) {
User that = (User) o;
return super.equals(that) //
&& Objects.equals(pictureUrl, that.pictureUrl) //
&& Objects.equals(email, that.email) //
&& Objects.equals(ecdhPublicKey, that.ecdhPublicKey) //
&& Objects.equals(ecdsaPublicKey, that.ecdsaPublicKey) //
&& Objects.equals(privateKeys, that.privateKeys) //
&& Objects.equals(setupCode, that.setupCode);
&& Objects.equals(email, that.email);
}

@Override
public int hashCode() {
return Objects.hash(super.getId(), pictureUrl, email, ecdhPublicKey, privateKeys, setupCode);
return Objects.hash(super.getId(), pictureUrl, email);
}

@ApplicationScoped
Expand Down
4 changes: 2 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@types/node": "^22.8.1",
"@types/semver": "^7.5.8",
"@vitejs/plugin-vue": "^5.1.4",
"@vue/compiler-sfc": "^3.4.37",
"@vue/compiler-sfc": "^3.5.12",
"autoprefixer": "^10.4.20",
"chai": "^5.1.2",
"chai-as-promised": "^8.0.0",
Expand Down Expand Up @@ -63,7 +63,7 @@
"miscreant": "^0.3.2",
"rfc4648": "^1.5.3",
"semver": "^7.6.3",
"vue": "^3.4.38",
"vue": "^3.5.12",
"vue-i18n": "^10.0.4",
"vue-router": "^4.4.5"
},
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/SearchInputGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="relative">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<UsersIcon v-if="selectedItem == null" class="h-5 w-5 text-gray-400" aria-hidden="true" />
<img v-else :src="resolvePictureUrl(selectedItem)" alt="" class="w-5 h-5 rounded-full" >
<img v-else :src="selectedItem.pictureUrl ?? ''" alt="" class="w-5 h-5 rounded-full" >
</div>

<ComboboxInput v-if="selectedItem == null" v-focus class="w-full h-10 rounded-l-md border border-gray-300 bg-white py-2 px-10 shadow-sm focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary sm:text-sm disabled:bg-primary-l2" placeholder="John Doe" @change="query = $event.target.value"/>
Expand All @@ -15,7 +15,7 @@
<ComboboxOptions v-if="selectedItem == null && filteredItems.length > 0" class="absolute z-10 mt-1 max-h-56 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm">
<ComboboxOption v-for="item in filteredItems" :key="item.id" :value="item" class="relative cursor-default select-none py-2 pl-3 pr-9 ui-not-active:text-gray-900 ui-active:bg-primary ui-active:text-white">
<div class="flex items-center">
<img :src="resolvePictureUrl(item)" alt="" class="h-6 w-6 shrink-0 rounded-full" >
<img :src="item.pictureUrl ?? ''" alt="" class="h-6 w-6 shrink-0 rounded-full" >
<span class="ml-3 truncate">{{ item.name }}</span>
</div>
</ComboboxOption>
Expand All @@ -42,12 +42,12 @@ import { debounce } from '../common/util';
export type Item = {
id: string;
name: string;
pictureUrl?: string;
}
const props = defineProps<{
actionTitle: string
onSearch: (query: string) => Promise<T[]>,
resolvePictureUrl: (item: T) => string
onSearch: (query: string) => Promise<T[]>
}>();
const emit = defineEmits<{
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/VaultDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<span class="ml-4 text-sm font-medium text-primary group-hover:text-primary-l1">{{ t('common.share') }}</span>
</button>
</div>
<SearchInputGroup v-else-if="addingUser" :action-title="t('common.add')" :on-search="searchAuthority" :resolve-picture-url="item => item.pictureUrl || ''" @action="addAuthority" />
<SearchInputGroup v-else-if="addingUser" :action-title="t('common.add')" :on-search="searchAuthority" @action="addAuthority" />
<div v-if="onAddUserError != null">
<p v-if="onAddUserError instanceof PaymentRequiredError" class="text-sm text-red-900 text-right mt-1">
{{ t('vaultDetails.error.licenseViolated') }}
Expand Down
2 changes: 1 addition & 1 deletion frontend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"strict": true,
"jsx": "preserve",
"sourceMap": true,
Expand Down

0 comments on commit 3937c48

Please sign in to comment.