feat(fullstack): Read user out of JWT and persist with created and last modified
This commit is contained in:
@@ -62,7 +62,7 @@ const applicationForm = computed({
|
||||
})
|
||||
|
||||
const isReadOnly = computed(() => {
|
||||
return applicationForm.value?.createdBy !== user.value?.name
|
||||
return applicationForm.value?.createdBy.id !== user.value?.id
|
||||
})
|
||||
|
||||
async function onSubmit() {
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
#{{ index }} {{ applicationFormElem.name }}
|
||||
</p>
|
||||
<p class="text-(--ui-text-muted) text-sm">
|
||||
Zuletzt bearbeitet von {{ applicationFormElem.lastModifiedBy }} am
|
||||
Zuletzt bearbeitet von {{ applicationFormElem.lastModifiedBy.name }} am
|
||||
{{ formatDate(applicationFormElem.modifiedAt) }}
|
||||
</p>
|
||||
<p class="text-(--ui-text-muted) text-sm">
|
||||
Erstellt von {{ applicationFormElem.createdBy }} am {{ formatDate(applicationFormElem.createdAt) }}
|
||||
Erstellt von {{ applicationFormElem.createdBy.name }} am {{ formatDate(applicationFormElem.createdAt) }}
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -9,7 +9,8 @@ export const auth = betterAuth({
|
||||
plugins: [
|
||||
jwt({
|
||||
jwt: {
|
||||
issuer: 'http://192.168.178.105:3001'
|
||||
issuer: 'http://192.168.178.105:3001',
|
||||
expirationTime: '48h'
|
||||
},
|
||||
jwks: {
|
||||
keyPairConfig: {
|
||||
|
||||
Reference in New Issue
Block a user