mirror of
https://github.com/penpot/penpot.git
synced 2025-05-22 19:46:11 +02:00
🎉 Add missing rlimit metadata and configuration
This commit is contained in:
parent
ff30d505af
commit
741ad29d82
3 changed files with 6 additions and 6 deletions
|
@ -63,11 +63,6 @@
|
||||||
:storage-assets-fs-directory "assets"
|
:storage-assets-fs-directory "assets"
|
||||||
|
|
||||||
:assets-path "/internal/assets/"
|
:assets-path "/internal/assets/"
|
||||||
|
|
||||||
:rlimit-password 10
|
|
||||||
:rlimit-image 10
|
|
||||||
:rlimit-font 10
|
|
||||||
|
|
||||||
:smtp-default-reply-to "Penpot <no-reply@example.com>"
|
:smtp-default-reply-to "Penpot <no-reply@example.com>"
|
||||||
:smtp-default-from "Penpot <no-reply@example.com>"
|
:smtp-default-from "Penpot <no-reply@example.com>"
|
||||||
|
|
||||||
|
@ -175,6 +170,7 @@
|
||||||
(s/def ::redis-uri ::us/string)
|
(s/def ::redis-uri ::us/string)
|
||||||
(s/def ::registration-domain-whitelist ::us/set-of-str)
|
(s/def ::registration-domain-whitelist ::us/set-of-str)
|
||||||
(s/def ::rlimit-font ::us/integer)
|
(s/def ::rlimit-font ::us/integer)
|
||||||
|
(s/def ::rlimit-file-update ::us/integer)
|
||||||
(s/def ::rlimit-image ::us/integer)
|
(s/def ::rlimit-image ::us/integer)
|
||||||
(s/def ::rlimit-password ::us/integer)
|
(s/def ::rlimit-password ::us/integer)
|
||||||
(s/def ::smtp-default-from ::us/string)
|
(s/def ::smtp-default-from ::us/string)
|
||||||
|
@ -281,6 +277,7 @@
|
||||||
::registration-domain-whitelist
|
::registration-domain-whitelist
|
||||||
::registration-enabled
|
::registration-enabled
|
||||||
::rlimit-font
|
::rlimit-font
|
||||||
|
::rlimit-file-update
|
||||||
::rlimit-image
|
::rlimit-image
|
||||||
::rlimit-password
|
::rlimit-password
|
||||||
::sentry-dsn
|
::sentry-dsn
|
||||||
|
|
|
@ -273,7 +273,7 @@
|
||||||
(contains? o :changes-with-metadata)))))
|
(contains? o :changes-with-metadata)))))
|
||||||
|
|
||||||
(sv/defmethod ::update-file
|
(sv/defmethod ::update-file
|
||||||
{::rlimit/permits 20}
|
{::rlimit/permits (cf/get :rlimit-file-update)}
|
||||||
[{:keys [pool] :as cfg} {:keys [id profile-id] :as params}]
|
[{:keys [pool] :as cfg} {:keys [id profile-id] :as params}]
|
||||||
(db/with-atomic [conn pool]
|
(db/with-atomic [conn pool]
|
||||||
(db/xact-lock! conn id)
|
(db/xact-lock! conn id)
|
||||||
|
|
|
@ -10,9 +10,11 @@
|
||||||
[app.common.exceptions :as ex]
|
[app.common.exceptions :as ex]
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
[app.common.uuid :as uuid]
|
[app.common.uuid :as uuid]
|
||||||
|
[app.config :as cf]
|
||||||
[app.db :as db]
|
[app.db :as db]
|
||||||
[app.media :as media]
|
[app.media :as media]
|
||||||
[app.rpc.queries.teams :as teams]
|
[app.rpc.queries.teams :as teams]
|
||||||
|
[app.rpc.rlimit :as rlimit]
|
||||||
[app.storage :as sto]
|
[app.storage :as sto]
|
||||||
[app.util.services :as sv]
|
[app.util.services :as sv]
|
||||||
[app.util.time :as dt]
|
[app.util.time :as dt]
|
||||||
|
@ -39,6 +41,7 @@
|
||||||
::font-id ::font-family ::font-weight ::font-style]))
|
::font-id ::font-family ::font-weight ::font-style]))
|
||||||
|
|
||||||
(sv/defmethod ::create-font-variant
|
(sv/defmethod ::create-font-variant
|
||||||
|
{::rlimit/permits (cf/get :rlimit-font)}
|
||||||
[{:keys [pool] :as cfg} {:keys [team-id profile-id] :as params}]
|
[{:keys [pool] :as cfg} {:keys [team-id profile-id] :as params}]
|
||||||
(let [cfg (update cfg :storage media/configure-assets-storage)]
|
(let [cfg (update cfg :storage media/configure-assets-storage)]
|
||||||
(teams/check-edition-permissions! pool profile-id team-id)
|
(teams/check-edition-permissions! pool profile-id team-id)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue