diff --git a/CHANGES.md b/CHANGES.md index ea160e12e..b2d2887e7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -14,6 +14,14 @@ - Fix components are not dragged from the group to the assets tab [Taiga #8273](https://tree.taiga.io/project/penpot/issue/8273) +## 2.1.2 + +### :bug: Bugs fixed + +- User switch language to "zh_hant" will get 400 [Github #4884](https://github.com/penpot/penpot/issues/4884) +- Smtp config ignoring port if ssl is set [Github #4872](https://github.com/penpot/penpot/issues/4872) +- Ability to let users to authenticate with a private oidc provider only [Github #4963](https://github.com/penpot/penpot/issues/4963) + ## 2.1.1 ### :sparkles: New features diff --git a/backend/src/app/auth/oidc.clj b/backend/src/app/auth/oidc.clj index 824f8a937..2ac5ab830 100644 --- a/backend/src/app/auth/oidc.clj +++ b/backend/src/app/auth/oidc.clj @@ -592,7 +592,8 @@ :else (let [info (assoc info :is-active (provider-has-email-verified? cfg info))] - (if (contains? cf/flags :registration) + (if (or (contains? cf/flags :registration) + (contains? cf/flags :oidc-registration)) (redirect-to-register cfg info request) (redirect-with-error "registration-disabled"))))) diff --git a/backend/src/app/email.clj b/backend/src/app/email.clj index 03228e45b..102b6fea8 100644 --- a/backend/src/app/email.clj +++ b/backend/src/app/email.clj @@ -304,6 +304,8 @@ (let [session (create-smtp-session cfg)] (with-open [transport (.getTransport session (if (::ssl cfg) "smtps" "smtp"))] (.connect ^Transport transport + ^String (::host cfg) + ^String (::port cfg) ^String (::username cfg) ^String (::password cfg)) diff --git a/backend/src/app/rpc/commands/profile.clj b/backend/src/app/rpc/commands/profile.clj index 40b8b8a43..e3b453e26 100644 --- a/backend/src/app/rpc/commands/profile.clj +++ b/backend/src/app/rpc/commands/profile.clj @@ -102,7 +102,7 @@ (sm/define [:map {:title "update-profile"} [:fullname [::sm/word-string {:max 250}]] - [:lang {:optional true} [:string {:max 5}]] + [:lang {:optional true} [:string {:max 8}]] [:theme {:optional true} [:string {:max 250}]]])) (sv/defmethod ::update-profile diff --git a/frontend/src/app/main/ui/auth.cljs b/frontend/src/app/main/ui/auth.cljs index c22ec0902..4d24070cc 100644 --- a/frontend/src/app/main/ui/auth.cljs +++ b/frontend/src/app/main/ui/auth.cljs @@ -48,7 +48,8 @@ (not= section :auth-register-validate) (not= section :auth-register-success)) params (:query-params route) - error (:error params)] + error (:error params) + hide-image-auth? (cf/external-feature-flag "signup-01" "test")] (mf/with-effect [] (dom/set-html-title (tr "title.default"))) @@ -57,14 +58,17 @@ (when error (st/emit! (du/show-redirect-error error)))) - [:main {:class (stl/css :auth-section)} + [:main {:class (stl/css-case :auth-section (not hide-image-auth?) + :auth-section-hide-image hide-image-auth?)} (when show-login-icon [:h1 {:class (stl/css :logo-container)} [:a {:href "#/" :title "Penpot" :class (stl/css :logo-btn)} i/logo]]) - [:div {:class (stl/css :login-illustration)} - i/login-illustration] + (when (not hide-image-auth?) + [:div {:class (stl/css :login-illustration)} + i/login-illustration]) - [:section {:class (stl/css :auth-content)} + [:section {:class (stl/css-case :auth-content (not hide-image-auth?) + :auth-content-hide-image hide-image-auth?)} (case section :auth-register diff --git a/frontend/src/app/main/ui/auth.scss b/frontend/src/app/main/ui/auth.scss index 569fa7b9c..390d4083b 100644 --- a/frontend/src/app/main/ui/auth.scss +++ b/frontend/src/app/main/ui/auth.scss @@ -24,6 +24,24 @@ } } +// A-B text signup-01 +.auth-section-hide-image { + position: relative; + align-items: center; + background: var(--panel-background-color); + display: grid; + gap: $s-32; + height: 100%; + padding: $s-32; + width: 100%; + overflow: auto; + + @media (max-width: 992px) { + display: flex; + justify-content: center; + } +} + .logo-container { position: absolute; top: $s-20; @@ -65,6 +83,19 @@ width: 100%; } +// A-B text signup-01 +.auth-content-hide-image { + display: grid; + grid-template-rows: 1fr auto; + gap: $s-24; + height: fit-content; + margin: auto; + max-width: $s-412; + padding-block-end: $s-8; + position: relative; + width: 100%; +} + .logo-btn { svg { width: $s-120;