0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-03 04:49:03 -05:00

Merge branch 'main' into develop

This commit is contained in:
Andrey Antukh 2021-09-13 12:55:36 +02:00
commit 0711438433
6 changed files with 55 additions and 7 deletions

View file

@ -2,13 +2,22 @@
## :rocket: Next ## :rocket: Next
### :boom: Breaking changes
### :sparkles: New features
### :bug: Bugs fixed
### :arrow_up: Deps updates
### :boom: Breaking changes
### :heart: Community contributions by (Thank you!)
## 1.8.0-alpha
### :boom: Breaking changes ### :boom: Breaking changes
- This release includes a new approach for handling share links, and - This release includes a new approach for handling share links, and
this feature is incompatible with the previous one. This means that this feature is incompatible with the previous one. This means that
all the public share links generated previously will stop working. all the public share links generated previously will stop working.
### :sparkles: New features ### :sparkles: New features
- Add tooltips to color picker tabs [Taiga #1814](https://tree.taiga.io/project/penpot/us/1814). - Add tooltips to color picker tabs [Taiga #1814](https://tree.taiga.io/project/penpot/us/1814).
@ -26,7 +35,6 @@
- Allow navigate through pages on the viewer [Taiga #1550](https://tree.taiga.io/project/penpot/us/1550). - Allow navigate through pages on the viewer [Taiga #1550](https://tree.taiga.io/project/penpot/us/1550).
- Allow create share links with specific pages [Taiga #1844](https://tree.taiga.io/project/penpot/us/1844). - Allow create share links with specific pages [Taiga #1844](https://tree.taiga.io/project/penpot/us/1844).
### :bug: Bugs fixed ### :bug: Bugs fixed
- Prevent adding numeric suffix to layer names when not needed [Taiga #1929](https://tree.taiga.io/project/penpot/us/1929). - Prevent adding numeric suffix to layer names when not needed [Taiga #1929](https://tree.taiga.io/project/penpot/us/1929).
@ -39,6 +47,8 @@
- Fix problems with order in groups [Taiga #1960](https://tree.taiga.io/project/penpot/issue/1960) - Fix problems with order in groups [Taiga #1960](https://tree.taiga.io/project/penpot/issue/1960)
- Fix SVG components preview [#1134](https://github.com/penpot/penpot/issues/1134) - Fix SVG components preview [#1134](https://github.com/penpot/penpot/issues/1134)
- Fix group renaming problem [Taiga #1969](https://tree.taiga.io/project/penpot/issue/1969) - Fix group renaming problem [Taiga #1969](https://tree.taiga.io/project/penpot/issue/1969)
- Fix problem with import broken images links [#1197](https://github.com/penpot/penpot/issues/1197)
- Fix problem while moving imported SVG's [#1199](https://github.com/penpot/penpot/issues/1199)
### :arrow_up: Deps updates ### :arrow_up: Deps updates
### :boom: Breaking changes ### :boom: Breaking changes
@ -47,6 +57,21 @@
- eduayme [#1129](https://github.com/penpot/penpot/pull/1129). - eduayme [#1129](https://github.com/penpot/penpot/pull/1129).
## 1.7.4-alpha
### :bug: Bugs fixed
- Fix demo user creation (self-hosted only)
- Add better ldap response validation and reporting (self-hosted only)
## 1.7.3-alpha
### :bug: Bugs fixed
- Fix font uploading issue on Windows.
## 1.7.2-alpha ## 1.7.2-alpha
### :sparkles: New features ### :sparkles: New features

View file

@ -13,11 +13,20 @@
[app.loggers.audit :as audit] [app.loggers.audit :as audit]
[app.rpc.mutations.profile :as profile-m] [app.rpc.mutations.profile :as profile-m]
[app.rpc.queries.profile :as profile-q] [app.rpc.queries.profile :as profile-q]
[app.util.logging :as l]
[app.util.services :as sv] [app.util.services :as sv]
[clj-ldap.client :as ldap] [clj-ldap.client :as ldap]
[clojure.spec.alpha :as s] [clojure.spec.alpha :as s]
[clojure.string])) [clojure.string]))
(s/def ::fullname ::us/not-empty-string)
(s/def ::email ::us/email)
(s/def ::backend ::us/not-empty-string)
(s/def ::info-data
(s/keys :req-un [::fullname ::email ::backend]))
(defn ^java.lang.AutoCloseable connect (defn ^java.lang.AutoCloseable connect
[] []
(let [params {:ssl? (cfg/get :ldap-ssl) (let [params {:ssl? (cfg/get :ldap-ssl)
@ -57,6 +66,13 @@
(ex/raise :type :validation (ex/raise :type :validation
:code :wrong-credentials)) :code :wrong-credentials))
(when-not (s/valid? ::info-data info)
(let [explain (s/explain-str ::info-data info)]
(l/warn ::l/raw (str "invalid response from ldap, looks like ldap is not configured correctly\n" explain))
(ex/raise :type :restriction
:code :wrong-ldap-response
:reason explain)))
(let [profile (login-or-register cfg {:email (:email info) (let [profile (login-or-register cfg {:email (:email info)
:backend (:backend info) :backend (:backend info)
:fullname (:fullname info)})] :fullname (:fullname info)})]
@ -94,7 +110,9 @@
(cfg/get :ldap-attrs-fullname)] (cfg/get :ldap-attrs-fullname)]
base-dn (cfg/get :ldap-base-dn) base-dn (cfg/get :ldap-base-dn)
params {:filter query :sizelimit 1 :attributes attrs}] params {:filter query
:sizelimit 1
:attributes attrs}]
(first (ldap/search cpool base-dn params)))) (first (ldap/search cpool base-dn params))))
(defn- authenticate (defn- authenticate

View file

@ -92,6 +92,7 @@ services:
ports: ports:
- "1080:1080" - "1080:1080"
# https://github.com/rroemhild/docker-test-openldap
ldap: ldap:
image: rroemhild/test-openldap:2.1 image: rroemhild/test-openldap:2.1
expose: expose:

View file

@ -159,7 +159,8 @@
id)) id))
svg-attrs (-> svg-attrs svg-attrs (-> svg-attrs
(usvg/clean-attrs) (usvg/clean-attrs)
(usvg/update-attr-ids replace-id)) (usvg/update-attr-ids replace-id)
(dissoc :id))
attrs (-> svg-attrs (dissoc :style) (clj->js)) attrs (-> svg-attrs (dissoc :style) (clj->js))
styles (-> svg-attrs (:style {}) (clj->js))] styles (-> svg-attrs (:style {}) (clj->js))]

View file

@ -170,7 +170,8 @@
(fn [_] (fn [_]
(let [filename (str (:name file) ".pdf") (let [filename (str (:name file) ".pdf")
frame-ids (mapv :id frames)] frame-ids (mapv :id frames)]
(st/emit! (dm/info (tr "workspace.options.exporting-object"))) (st/emit! (dm/info (tr "workspace.options.exporting-object")
{:timeout nil}))
(->> (rp/query! :export-frames (->> (rp/query! :export-frames
{:name (:name file) {:name (:name file)
:file-id (:id file) :file-id (:id file)

View file

@ -255,7 +255,7 @@
(let [name (cip/get-image-name node) (let [name (cip/get-image-name node)
data-uri (cip/get-image-data node)] data-uri (cip/get-image-data node)]
(->> (upload-media-files file-id name data-uri) (->> (upload-media-files file-id name data-uri)
(rx/catch #(do (.error js/console %) (rx/catch #(do (.error js/console "Error uploading media: " name)
(rx/of node))) (rx/of node)))
(rx/map (rx/map
(fn [media] (fn [media]
@ -370,7 +370,9 @@
:content content :content content
:is-local false}))) :is-local false})))
(rx/flat-map #(rp/mutation! :upload-file-media-object %)) (rx/flat-map #(rp/mutation! :upload-file-media-object %))
(rx/map (constantly media)))))) (rx/map (constantly media))
(rx/catch #(do (.error js/console (str "Error uploading media: " (:name media)) )
(rx/empty)))))))
(rx/reduce fb/add-library-media file))) (rx/reduce fb/add-library-media file)))
(rx/of file))) (rx/of file)))