mirror of
https://github.com/penpot/penpot.git
synced 2026-09-08 13:09:22 +00:00
🐛 Fix organization invitation schema validation for logo URI (#11238)
This commit is contained in:
parent
3db7548c19
commit
c7f036bed0
@ -17,6 +17,7 @@
|
|||||||
[app.common.types.organization :as cto]
|
[app.common.types.organization :as cto]
|
||||||
[app.common.types.profile :refer [schema:profile, schema:basic-profile]]
|
[app.common.types.profile :refer [schema:profile, schema:basic-profile]]
|
||||||
[app.common.types.team :refer [schema:team]]
|
[app.common.types.team :refer [schema:team]]
|
||||||
|
[app.common.uri :as u]
|
||||||
[app.common.uuid :as uuid]
|
[app.common.uuid :as uuid]
|
||||||
[app.config :as cf]
|
[app.config :as cf]
|
||||||
[app.db :as db]
|
[app.db :as db]
|
||||||
@ -499,7 +500,7 @@ RETURNING id, deleted_at;")
|
|||||||
{:id id
|
{:id id
|
||||||
:name name
|
:name name
|
||||||
:initials (if logo-id "" (d/get-initials name))
|
:initials (if logo-id "" (d/get-initials name))
|
||||||
:logo (when logo-id (files/resolve-public-uri logo-id))
|
:logo (when logo-id (u/uri (files/resolve-public-uri logo-id)))
|
||||||
:avatar-bg-url (when-not logo-id avatar-bg-url)
|
:avatar-bg-url (when-not logo-id avatar-bg-url)
|
||||||
:sso-active (true? sso-active)}))
|
:sso-active (true? sso-active)}))
|
||||||
|
|
||||||
|
|||||||
@ -178,7 +178,7 @@
|
|||||||
(t/is (th/success? out))
|
(t/is (th/success? out))
|
||||||
(t/is (= "Trusted Organization" (:name organization)))
|
(t/is (= "Trusted Organization" (:name organization)))
|
||||||
(t/is (= "" (:initials organization)))
|
(t/is (= "" (:initials organization)))
|
||||||
(t/is (str/ends-with? (:logo organization)
|
(t/is (str/ends-with? (str (:logo organization))
|
||||||
(str "/assets/by-id/" logo-id)))
|
(str "/assets/by-id/" logo-id)))
|
||||||
(t/is (nil? (:avatar-bg-url organization)))
|
(t/is (nil? (:avatar-bg-url organization)))
|
||||||
(t/is (true? (:sso-active organization))))))))
|
(t/is (true? (:sso-active organization))))))))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user