0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-14 16:51:18 -05:00

Merge remote-tracking branch 'origin/staging' into develop

This commit is contained in:
Alejandro Alonso 2024-05-28 08:14:20 +02:00
commit 6d8fe193fb
31 changed files with 49 additions and 47 deletions

View file

@ -113,8 +113,7 @@
(s/def ::worker-default-parallelism ::us/integer)
(s/def ::worker-webhook-parallelism ::us/integer)
(s/def ::authenticated-cookie-domain ::us/string)
(s/def ::authenticated-cookie-name ::us/string)
(s/def ::auth-data-cookie-domain ::us/string)
(s/def ::auth-token-cookie-name ::us/string)
(s/def ::auth-token-cookie-max-age ::dt/duration)
@ -222,7 +221,6 @@
::audit-log-http-handler-concurrency
::auth-token-cookie-name
::auth-token-cookie-max-age
::authenticated-cookie-name
::authenticated-cookie-domain
::database-password
::database-uri

View file

@ -10,6 +10,7 @@
[app.common.data :as d]
[app.common.logging :as l]
[app.common.spec :as us]
[app.common.uri :as u]
[app.config :as cf]
[app.db :as db]
[app.db.sql :as sql]
@ -33,7 +34,7 @@
;; A cookie that we can use to check from other sites of the same
;; domain if a user is authenticated.
(def default-authenticated-cookie-name "authenticated")
(def default-auth-data-cookie-name "auth-data")
;; Default value for cookie max-age
(def default-cookie-max-age (dt/duration {:days 7}))
@ -133,9 +134,9 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(declare ^:private assign-auth-token-cookie)
(declare ^:private assign-authenticated-cookie)
(declare ^:private assign-auth-data-cookie)
(declare ^:private clear-auth-token-cookie)
(declare ^:private clear-authenticated-cookie)
(declare ^:private clear-auth-data-cookie)
(declare ^:private gen-token)
(defn create-fn
@ -153,7 +154,7 @@
(l/trace :hint "create" :profile-id (str profile-id))
(-> response
(assign-auth-token-cookie session)
(assign-authenticated-cookie session)))))
(assign-auth-data-cookie session)))))
(defn delete-fn
[{:keys [::manager]}]
@ -167,7 +168,7 @@
(assoc :status 204)
(assoc :body nil)
(clear-auth-token-cookie)
(clear-authenticated-cookie)))))
(clear-auth-data-cookie)))))
(defn- gen-token
[props {:keys [profile-id created-at]}]
@ -229,7 +230,7 @@
(let [session (update! manager session)]
(-> response
(assign-auth-token-cookie session)
(assign-authenticated-cookie session)))
(assign-auth-data-cookie session)))
response))))
(def soft-auth
@ -262,11 +263,11 @@
:secure secure?}]
(update response :cookies assoc name cookie)))
(defn- assign-authenticated-cookie
[response {updated-at :updated-at}]
(defn- assign-auth-data-cookie
[response {profile-id :profile-id updated-at :updated-at}]
(let [max-age (cf/get :auth-token-cookie-max-age default-cookie-max-age)
domain (cf/get :authenticated-cookie-domain)
cname (cf/get :authenticated-cookie-name "authenticated")
domain (cf/get :auth-data-cookie-domain)
cname default-auth-data-cookie-name
created-at (or updated-at (dt/now))
renewal (dt/plus created-at default-renewal-max-age)
@ -274,14 +275,17 @@
comment (str "Renewal at: " (dt/format-instant renewal :rfc1123))
secure? (contains? cf/flags :secure-session-cookies)
strict? (contains? cf/flags :strict-session-cookies)
cors? (contains? cf/flags :cors)
cookie {:domain domain
:expires expires
:path "/"
:comment comment
:value true
:same-site :strict
:value (u/map->query-string {:profile-id profile-id})
:same-site (if cors? :none (if strict? :strict :lax))
:secure secure?}]
(cond-> response
(string? domain)
(update :cookies assoc cname cookie))))
@ -291,10 +295,10 @@
(let [cname (cf/get :auth-token-cookie-name default-auth-token-cookie-name)]
(update response :cookies assoc cname {:path "/" :value "" :max-age 0})))
(defn- clear-authenticated-cookie
(defn- clear-auth-data-cookie
[response]
(let [cname (cf/get :authenticated-cookie-name default-authenticated-cookie-name)
domain (cf/get :authenticated-cookie-domain)]
(let [cname default-auth-data-cookie-name
domain (cf/get :auth-data-cookie-domain)]
(cond-> response
(string? domain)
(update :cookies assoc cname {:domain domain :path "/" :value "" :max-age 0}))))

View file

@ -392,7 +392,7 @@ msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"Lêers wat by biblioteke gevoeg is, sal hier verskyn. Probeer om jou lêers "
"te deel of voeg by vanaf ons [Biblioteke en "
"sjablone](https://penpot.app/libraries-templates.html)."
"sjablone](https://penpot.app/libraries-templates)."
msgid "dashboard.export-binary-multi"
msgstr "Laai %s Penpot lêers (.penpot) af"

View file

@ -301,7 +301,7 @@ msgstr "تكرير %s الملفات"
msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"أوه لا! ليس لديك ملفات بعد! إذا كنت تريد تجربة بعض القوالب ، فانتقل إلى "
"[المكتبات والقوالب] (https://penpot.app/libraries-templates.html)"
"[المكتبات والقوالب] (https://penpot.app/libraries-templates)"
msgid "dashboard.export-binary-multi"
msgstr "تنزيل ملفات ٪s Penpot (.penpot)"

View file

@ -307,7 +307,7 @@ msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"Encara no hi ha fitxers. Si voleu provar algunes plantilles, podeu anar a "
"la secció [Biblioteques i "
"plantilles](https://penpot.app/libraries-templates.html)"
"plantilles](https://penpot.app/libraries-templates)"
msgid "dashboard.export-binary-multi"
msgstr "Baixa %s fitxers Penpot (.penpot)"

View file

@ -406,7 +406,7 @@ msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"Zde se zobrazí soubory přidané do knihoven. Zkuste své soubory sdílet nebo "
"je přidat z našich [Libraries & "
"templates](https://penpot.app/libraries-templates.html)."
"templates](https://penpot.app/libraries-templates)."
msgid "dashboard.export-binary-multi"
msgstr "Stáhnout soubory %s Penpot (.penpot)"

View file

@ -408,7 +408,7 @@ msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"Files added to Libraries will appear here. Try sharing your files or add "
"from our [Libraries & "
"templates](https://penpot.app/libraries-templates.html)."
"templates](https://penpot.app/libraries-templates)."
msgid "dashboard.export-binary-multi"
msgstr "Download %s Penpot files (.penpot)"

View file

@ -416,7 +416,7 @@ msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"Los archivos agregados a las bibliotecas aparecerán aquí. Si quieres probar "
"con alguna plantilla ve a [Bibliotecas y "
"plantillas](https://penpot.app/libraries-templates.html)."
"plantillas](https://penpot.app/libraries-templates)."
msgid "dashboard.export-binary-multi"
msgstr "Descargar %s archivos Penpot (.penpot)"

View file

@ -404,7 +404,7 @@ msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"Los archivos agregados a las Bibliotecas aparecerán aquí. Intente compartir "
"sus archivos o agréguelos desde nuestras [Libraries & "
"templates](https://penpot.app/libraries-templates.html)."
"templates](https://penpot.app/libraries-templates)."
msgid "dashboard.export-binary-multi"
msgstr "Descargar %s archivos Penpot (.penpot)"

View file

@ -305,7 +305,7 @@ msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"Oh ez! Oraindik ez duzu fitxategirik! Txantiloi batekin proba egin nahi "
"baduzu joan [Liburutegi eta "
"txantiloiak](https://penpot.app/libraries-templates.html) atalera."
"txantiloiak](https://penpot.app/libraries-templates) atalera."
msgid "dashboard.export-binary-multi"
msgstr "Deskargatu %s Penpot fitxategi (.penpot)"

View file

@ -304,7 +304,7 @@ msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"وای نه! شما هنوز هیچ فایلی ندارید! اگر می‌خواهید چند الگو را امتحان کنید، "
"به [کتابخانه‌ها و الگوها] بروید "
"(https://penpot.app/libraries-templates.html)"
"(https://penpot.app/libraries-templates)"
#, fuzzy
msgid "dashboard.export-binary-multi"

View file

@ -294,7 +294,7 @@ msgstr "Tvítak %s fílur"
msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"Áh nei! Tú hevur ongar fílur enn! Um tú vilt royna við nøkrum skapilónum, "
"vitja [Libraries & templates](https://penpot.app/libraries-templates.html)"
"vitja [Libraries & templates](https://penpot.app/libraries-templates)"
msgid "dashboard.export-binary-multi"
msgstr "Heinta %s Penpot fílur (.penpot)"

View file

@ -397,7 +397,7 @@ msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"Oh non ! Vous n'avez pas encore de fichiers ! Si vous voulez essayer avec "
"des modèles, allez sur [Bibliothèques et modèles] "
"(https://penpot.app/libraries-templates.html)."
"(https://penpot.app/libraries-templates)."
msgid "dashboard.export-binary-multi"
msgstr "Télécharger %s fichiers Penpot (.penpot)"

View file

@ -302,7 +302,7 @@ msgstr "Duplicar % ficheiros"
msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"Ai non! Ainda non tes ficheiros! Se queres facer a proba con algún modelo "
"vai a [Bibliotecas e modelos] (https://penpot.app/libraries-templates.html)"
"vai a [Bibliotecas e modelos] (https://penpot.app/libraries-templates)"
msgid "dashboard.export-binary-multi"
msgstr "Descargar %s ficheiros Penpot (.penpot)"

View file

@ -402,7 +402,7 @@ msgstr "שכפול %s קבצים"
msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"קבצים שנוספו לספריות יתווספו לכאן. כדאי לנסות לשתף את הקבצים שלך או להוסיף "
"אותם מ[הספריות והתבניות](https://penpot.app/libraries-templates.html)."
"אותם מ[הספריות והתבניות](https://penpot.app/libraries-templates)."
msgid "dashboard.export-binary-multi"
msgstr "הורדת %s קובצי Penpot (.penpot)"

View file

@ -304,7 +304,7 @@ msgstr "Kopiraj %s datoteka"
msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"O ne! Još nemaš datoteka! Ako želiš isprobati neke predloške, idi na "
"[Biblioteke i predlošci](https://penpot.app/libraries-templates.html)"
"[Biblioteke i predlošci](https://penpot.app/libraries-templates)"
msgid "dashboard.export-binary-multi"
msgstr "Preuzmi %s Penpot datoteke (.penpot)"

View file

@ -404,7 +404,7 @@ msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"Berkas yang ditambahkan ke Pustaka akan muncul di sini. Coba membagikan "
"berkas Anda atau menambahkan dari [Pustaka & "
"templat](https://penpot.app/libraries-templates.html) kami."
"templat](https://penpot.app/libraries-templates) kami."
msgid "dashboard.export-binary-multi"
msgstr "Unduh %s berkas Penpot (.penpot)"

View file

@ -300,7 +300,7 @@ msgstr "Duplicare %s file"
msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"Oh no! Non hai ancora nessun file! Se desideri provare alcuni template vai "
"su [Librerie e template](https://penpot.app/libraries-templates.html)"
"su [Librerie e template](https://penpot.app/libraries-templates)"
msgid "dashboard.export-binary-multi"
msgstr "Scarica %s file Penpot (.penpot)"

View file

@ -263,7 +263,7 @@ msgstr "%s ファイルを複製"
msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"まだファイルがありません。もしいくつかのテンプレートを試してみたいなら、[Libraries & "
"templates](https://penpot.app/libraries-templates.html) をチェックしてみてください。"
"templates](https://penpot.app/libraries-templates) をチェックしてみてください。"
msgid "dashboard.export-frames"
msgstr "PDFでエクスポート"

View file

@ -293,7 +293,7 @@ msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"Čia bus rodomi prie bibliotekų pridėti failai. Pabandykite bendrinti failus "
"arba pridėti iš mūsų [Bibliotekos ir šablonai] "
"(https://penpot.app/libraries-templates.html)"
"(https://penpot.app/libraries-templates)"
msgid "dashboard.export-frames"
msgstr "Eksportuokite darbalaukius į PDF"

View file

@ -413,7 +413,7 @@ msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"Šeit tiks parādītas bibliotēkām pievienotās datnes. Mēģini koplietot datnes "
"vai pievienot tās no mūsu [bibliotēkām un "
"veidnēm](https://penpot.app/libraries-templates.html)."
"veidnēm](https://penpot.app/libraries-templates)."
msgid "dashboard.export-binary-multi"
msgstr "Lejupielādēt %s Penpot datnes (.penpot)"

View file

@ -221,7 +221,7 @@ msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"ഇതുവരെയും ഇവിടെ ഫയലുകളില്ല. നിങ്ങൾക്ക് ചില ടെമ്പ്ലേറ്റുകൾ "
"പരീക്ഷിക്കണമെന്നുണ്ടെങ്കിൽ [ലൈബ്രറികളുടെയും ടെമ്പ്ലേറ്റുകളുടെയും "
"വിഭാഗത്തിലേക്ക്] (https://penpot.app/libraries-templates.html) പോകാവുന്നതാണ്"
"വിഭാഗത്തിലേക്ക്] (https://penpot.app/libraries-templates) പോകാവുന്നതാണ്"
msgid "dashboard.export-frames"
msgstr "ആർട്ട്ബോർഡുകൾ പിഡിഎഫായി എക്സ്പോർട്ട് ചെയ്യുക"

View file

@ -387,7 +387,7 @@ msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"Fail yang ditambahkan pada Perpustakaan akan dipaparkan di sini. Cuba "
"kongsi fail anda atau tambahkan daripada [Perpustakaan & "
"templat](https://penpot.app/libraries-templates.html) kami."
"templat](https://penpot.app/libraries-templates) kami."
msgid "dashboard.export-binary-multi"
msgstr "Muat turun %s fail Penpot (.penpot)"

View file

@ -427,7 +427,7 @@ msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"Bestanden die aan bibliotheken zijn toegevoegd, worden hier weergegeven. "
"Probeer je bestanden te delen of toe te voegen vanuit onze [Bibliotheken & "
"sjablonen] (https://penpot.app/libraries-templates.html)."
"sjablonen] (https://penpot.app/libraries-templates)."
msgid "dashboard.export-binary-multi"
msgstr "%s Penpot-bestanden downloaden (.penpot)"

View file

@ -305,7 +305,7 @@ msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"Tutaj pojawią się pliki dodane do Bibliotek. Spróbuj udostępnić swoje pliki "
"lub dodać z naszych [Bibliotek i "
"szablonów](https://penpot.app/libraries-templates.html)."
"szablonów](https://penpot.app/libraries-templates)."
msgid "dashboard.export-binary-multi"
msgstr "Pobierz %s plików Penpot (.penpot)"

View file

@ -303,7 +303,7 @@ msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"Arquivos adicionados na biblioteca de ativos vão aparecer aqui. Tente "
"compartilhar seus arquivos ou adicione das nossas [Bibliotecas & "
"modelos](https://penpot.app/libraries-templates.html)."
"modelos](https://penpot.app/libraries-templates)."
msgid "dashboard.export-binary-multi"
msgstr "Baixar %s arquivos Penpot (.penpot)"

View file

@ -403,7 +403,7 @@ msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"Os ficheiros adicionados às Bibliotecas irão aparecer aqui. Experimenta "
"adicionar os teus ficheiros ou experimenta algumas das nossas [Bibliotecas "
"e templates](https://penpot.app/libraries-templates.html)."
"e templates](https://penpot.app/libraries-templates)."
msgid "dashboard.export-binary-multi"
msgstr "Descarrega %s ficheiros Penpot (.penpot)"

View file

@ -402,7 +402,7 @@ msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"Fișierele adăugate la Biblioteci vor apărea aici. Încercați să partajați "
"fișierele dvs. sau adăugați-le din [Biblioteci și "
"șabloane](https://penpot.app/libraries-templates.html)."
"șabloane](https://penpot.app/libraries-templates)."
msgid "dashboard.export-binary-multi"
msgstr "Descărcați %s fișiere Penpot (.penpot)"

View file

@ -323,7 +323,7 @@ msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"Файлы, добавленные в Библиотеки, появятся здесь. Попробуйте поделиться "
"своими файлами или добавить их из наших [Библиотек и "
"шаблонов](https://penpot.app/libraries-templates.html)."
"шаблонов](https://penpot.app/libraries-templates)."
msgid "dashboard.export-binary-multi"
msgstr "Скачать файлы Penpot (.penpot) (%s)"

View file

@ -415,7 +415,7 @@ msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"Kütüphanelere eklenen dosyalar burada görünecektir. Dosyalarınızı "
"paylaşmayı deneyin veya [Kütüphaneler ve "
"şablonlarımızdan](https://penpot.app/libraries-templates.html) ekleyin."
"şablonlarımızdan](https://penpot.app/libraries-templates) ekleyin."
msgid "dashboard.export-binary-multi"
msgstr "%s Penpot dosyasını indir (.penpot)"

View file

@ -291,7 +291,7 @@ msgstr "複製 %s 個檔案"
msgid "dashboard.empty-placeholder-drafts"
msgstr ""
"添加在資料庫的檔案會在此處列出。請分享你的檔案或由我們的 [資料庫 & "
"模板區段](https://penpot.app/libraries-templates.html) 添加。"
"模板區段](https://penpot.app/libraries-templates) 添加。"
msgid "dashboard.export-binary-multi"
msgstr "下載 %s 個Penpot 檔案 .penpot"