Compare commits

..

4 Commits

Author SHA1 Message Date
Alejandro Alonso
ed5875f29a Merge pull request #7154 from penpot/niwinz-staging-bug-1
🐛 Fix incorrect show request-access dialog on not-found on viewer
2025-08-22 09:19:47 +02:00
Andrey Antukh
ad38a21053 🐛 Fix incorrect show request-access dialog on not-found on viewer
When a user is not-authenticated
2025-08-20 13:35:20 +02:00
Andrey Antukh
adffac4eec Merge remote-tracking branch 'origin/main' into staging 2025-08-20 12:49:31 +02:00
Yamila Moreno
73dfe12ec9 📚 Update k8s documentation 2025-08-20 09:04:25 +02:00
12 changed files with 195 additions and 317 deletions

1
.gitignore vendored
View File

@@ -31,7 +31,6 @@
/.clj-kondo/.cache
/_dump
/notes
/playground/
/backend/*.md
/backend/*.sql
/backend/*.txt

View File

@@ -357,7 +357,7 @@
[:id ::sm/uuid]
[:file-id ::sm/uuid]
[:created-at ::dt/instant]
[:content ::sm/any]])
[:content any?]])
(def schema:get-file-fragment
[:map {:title "get-file-fragment"}

View File

@@ -1,36 +0,0 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) KALEIDOS INC
(ns backend-tests.rpc-doc-test
"Internal binfile test, no RPC involved"
(:require
[app.common.json :as json]
[app.common.pprint :as pp]
[app.common.schema :as sm]
[app.common.schema.generators :as sg]
[app.common.schema.test :as smt]
[app.rpc :as-alias rpc]
[app.rpc.doc :as rpc.doc]
[backend-tests.helpers :as th]
[clojure.test :as t]))
(t/use-fixtures :once th/state-init)
(t/deftest openapi-context-json-encode
(smt/check!
(smt/for [context (->> sg/int
(sg/fmap (fn [_]
(rpc.doc/prepare-openapi-context (::rpc/methods th/*system*)))))]
(try
(json/encode context)
true
(catch Throwable _cause
false)))
{:num 30}))

View File

@@ -177,6 +177,12 @@
:title "Change"
:decode/json #(update % :type keyword)
::smd/simplified true}
[:set-option
;; DEPRECATED: remove before 2.3 release
;;
;; Is still there for not cause error when event is received
[:map {:title "SetOptionChange"}]]
[:set-comment-thread-position
[:map
@@ -189,7 +195,7 @@
[:map {:title "AddObjChange"}
[:type [:= :add-obj]]
[:id ::sm/uuid]
[:obj cts/schema:shape]
[:obj :map]
[:page-id {:optional true} ::sm/uuid]
[:component-id {:optional true} ::sm/uuid]
[:frame-id ::sm/uuid]
@@ -322,9 +328,7 @@
[:id ::sm/uuid]
[:name :string]
[:shapes {:optional true} [:vector {:gen/max 3} ::sm/any]]
[:path {:optional true} :string]
[:main-instance-id ::sm/uuid]
[:main-instance-page ::sm/uuid]]]
[:path {:optional true} :string]]]
[:mod-component
[:map {:title "ModCompoenentChange"}
@@ -542,6 +546,11 @@
#?(:clj (validate-shapes! data result items))
result))))
;; DEPRECATED: remove after 2.3 release
(defmethod process-change :set-option
[data _]
data)
;; --- Comment Threads
(defmethod process-change :set-comment-thread-position
@@ -1081,23 +1090,21 @@
;; === Operations
(def decode-shape-attrs
(sm/decoder cts/schema:shape-attrs sm/json-transformer))
(def ^:private decode-shape
(sm/decoder cts/schema:shape sm/json-transformer))
(defmethod process-operation :assign
[{:keys [type] :as shape} {:keys [value] :as op}]
(let [modifications (assoc value :type type)
modifications (decode-shape-attrs modifications)]
modifications (decode-shape modifications)]
(reduce-kv (fn [shape k v]
(if (not= v (get shape k))
(process-operation shape {:type :set
:attr k
:val v
:ignore-touched (:ignore-touched op)
:ignore-geometry (:ignore-geometry op)})
shape))
(process-operation shape {:type :set
:attr k
:val v
:ignore-touched (:ignore-touched op)
:ignore-geometry (:ignore-geometry op)}))
shape
(dissoc modifications :type))))
modifications)))
(defmethod process-operation :set
[shape op]

View File

@@ -111,7 +111,7 @@
(defmethod visit :fn [_ _ _ _] "FN")
(defmethod visit :vector [_ _ children _]
(str "[" (str/trim (last children)) "]"))
(str "[" (last children) "]"))
(defn -tagged [children] (map (fn [[tag _ c]] (str c " (tag: " tag ")")) children))
@@ -137,14 +137,8 @@
(some? suffix)
(str suffix))))
(defmethod visit :map-of
[_ schema children _]
(let [props (m/properties schema)
title (some->> (:title props) str/camel str/capital)]
(str (if title
(str "type " title ": ")
"")
"map[" (first children) "," (second children) "]")))
(defmethod visit :map-of [_ _ children _]
(str "map[" (first children) "," (second children) "]"))
(defmethod visit :union [_ _ children _]
(str/join " | " children))
@@ -162,123 +156,61 @@
(or (:title props)
"*")))
(defn- format-map
[schema children]
(let [props (m/properties schema)
closed? (get props :closed)
title (some->> (:title props) str/camel str/capital)
level 0
optional (into #{} (comp (filter (m/-comp :optional second))
(map first))
children)
entries (->> children
(map (fn [[k _ s]]
;; NOTE: maybe we can detect multiple lines
;; and then just insert a break line
(str (pad " " level) (str/camel k)
(when (contains? optional k) "?")
": " (str/trim s))))
(str/join ",\n"))
header (cond-> (str "type " title)
closed? (str "!")
(some? title) (str " "))]
(str (pad header level) "{\n" entries "\n" (pad "}\n" level))))
(defmethod visit :map
[_ schema children {:keys [::level ::max-level] :as options}]
(let [props (m/properties schema)
closed? (get props :closed)
title (some->> (:title props) str/camel str/capital)
extracted? (get props ::extracted false)]
(let [props (m/properties schema)
closed? (:closed props)
title (some->> (:title props) str/camel str/capital)]
(if (= level 0)
(format-map schema children)
(if (>= level max-level)
(or (some-> title str)
"<untitled>")
(let [optional (into #{} (comp (filter (m/-comp :optional second))
(map first))
children)
entries (->> children
(map (fn [[k _ s]]
(str (pad " " level) (str/camel k)
(when (contains? optional k) "?")
": " s)))
(str/join ",\n"))
(if title
(if extracted?
(format-map schema children)
(let [schema (mu/update-properties schema assoc ::extracted true)]
(swap! *definitions* conj (describe* schema options))
(pad title level)))
(format-map schema children)))))
header (cond-> (str "type " title)
closed? (str "!")
(some? title) (str " "))]
(defn format-multi
[s children]
(let [props (m/properties s)
title (some-> (:title props) str/camel str/capital)
dispatcher (or (-> s m/properties :dispatch-description)
(-> s m/properties :dispatch))
(str (pad header level) "{\n" entries "\n" (pad "}\n" level))))))
entries (->> children
(map (fn [[_ _ shape]]
(str shape)))
(str/join ",\n"))
(defmethod visit :multi
[_ s children {:keys [::level ::max-level] :as options}]
(let [props (m/properties s)
title (some-> (:title props) str/camel str/capital)]
(if (>= level max-level)
title
(let [dispatcher (or (-> s m/properties :dispatch-description)
(-> s m/properties :dispatch))
header (cond-> "multi"
prefix (apply str (take (inc level) (repeat " ")))
entries (->> children
(map (fn [[_ _ shape]]
(str prefix shape)))
(str/join ",\n"))
header (cond-> "multi"
(some? title) (str " " title)
:always (str " [dispatch=" (d/name dispatcher) "]"))]
(str header " {\n" entries "\n}")))
(str header " {\n" entries "\n" (pad "}" level))))))
(defmethod visit :multi
[_ schema children {:keys [::level ::max-level] :as options}]
(let [props (m/properties schema)
title (some-> (:title props) str/camel str/capital)
extracted? (get props ::extracted false)]
(cond
(zero? level)
(format-multi schema children)
(and title extracted?)
(format-multi schema children)
(and title (not extracted?))
(let [schema (mu/update-properties schema assoc ::extracted true)]
(swap! *definitions* conj (describe* schema options))
(pad title level))
:else
(format-multi schema children))))
(defn- format-merge
[schema children]
(let [props (m/properties schema)
entries (->> children
(map (fn [shape]
(str shape)))
(str/join ",\n"))
title (some-> (:title props) str/camel str/capital)
header (str "merge type " title)]
(str header " {\n" entries "\n}")))
(defmethod visit :merge
[_ schema children {:keys [::level ::max-level] :as options}]
(let [props (m/properties schema)
title (some-> (:title props) str/camel str/capital)
extracted? (get props ::extracted false)]
(cond
(zero? level)
(format-merge schema children)
(and title extracted?)
(format-merge schema children)
(and title (not extracted?))
(let [schema (mu/update-properties schema assoc ::extracted true)]
(swap! *definitions* conj (describe* schema options))
(pad title level))
:else
(format-merge schema children))))
[_ schema children _]
(let [entries (str/join ",\n" children)
props (m/properties schema)
title (or (some-> (:title props) str/camel str/capital)
"<untitled>")]
(str "merge type " title " { \n" entries "\n}\n")))
(defmethod visit ::sm/one-of
[_ _ children _]
@@ -287,21 +219,8 @@
(map d/name)
(str/join "|")) ")")))
(defmethod visit :schema
[_ schema children options]
(let [props (m/properties schema)
title (some-> (:title props) str/camel str/capital)
extracted? (get props ::extracted false)]
(if title
(if extracted?
(str "type " title ": "
(visit ::m/schema schema children options))
(let [schema (mu/update-properties schema assoc ::extracted true)]
(swap! *definitions* conj (describe* schema options))
title))
(visit ::m/schema schema children options))))
(defmethod visit :schema [_ schema children options]
(visit ::m/schema schema children options))
(defmethod visit ::m/schema
[_ schema _ {:keys [::level ::limit ::max-level] :as options}]
@@ -320,12 +239,9 @@
(describe* schema' options)))
(and ref title)
(let [options (-> options
(assoc ::base-level level)
)]
;; (when (<= limit max-level)
(swap! *definitions* conj (describe* schema' options))
(do
(when (<= limit max-level)
(swap! *definitions* conj (describe* schema' (assoc options ::base-limit limit))))
title)
@@ -338,11 +254,10 @@
(describe* schema' (assoc options ::base-level level ::base-limit limit)))))
(defn describe* [s options]
(letfn [(walk-fn [schema path children {:keys [::base-level ::base-limit]
:or {base-level 0 base-limit 0} :as options}]
(let [options (-> options
(assoc ::limit (+ base-limit (count path)))
(assoc ::level (+ base-level (count path))))]
(letfn [(walk-fn [schema path children {:keys [::base-level ::base-limit] :or {base-level 0 base-limit 0} :as options}]
(let [options (assoc options
::limit (+ base-limit (count path))
::level (+ base-level (count path)))]
(visit (m/type schema) schema children options)))]
(m/walk s walk-fn options)))

View File

@@ -24,7 +24,7 @@
(def schema:plugin-data
(sm/register!
^{::sm/type ::plugin-data}
[:map-of {:gen/max 5 :title "PluginsData"}
[:map-of {:gen/max 5}
schema:keyword
[:map-of {:gen/max 5}
schema:string

View File

@@ -185,50 +185,50 @@
[:height ::sm/safe-number]])
(def schema:shape-generic-attrs
[:map {:title "ShapeGenericAttrs"}
;; [:page-id {:optional true} ::sm/uuid]
;; [:component-id {:optional true} ::sm/uuid]
;; [:component-file {:optional true} ::sm/uuid]
;; [:component-root {:optional true} :boolean]
;; [:main-instance {:optional true} :boolean]
;; [:remote-synced {:optional true} :boolean]
;; [:shape-ref {:optional true} ::sm/uuid]
;; [:touched {:optional true} [:maybe [:set :keyword]]]
;; [:blocked {:optional true} :boolean]
;; [:collapsed {:optional true} :boolean]
;; [:locked {:optional true} :boolean]
;; [:hidden {:optional true} :boolean]
;; [:masked-group {:optional true} :boolean]
;; [:fills {:optional true}
;; [:vector {:gen/max 2} schema:fill]]
;; [:proportion {:optional true} ::sm/safe-number]
;; [:proportion-lock {:optional true} :boolean]
;; [:constraints-h {:optional true}
;; [::sm/one-of horizontal-constraint-types]]
;; [:constraints-v {:optional true}
;; [::sm/one-of vertical-constraint-types]]
;; [:fixed-scroll {:optional true} :boolean]
;; [:r1 {:optional true} ::sm/safe-number]
;; [:r2 {:optional true} ::sm/safe-number]
;; [:r3 {:optional true} ::sm/safe-number]
;; [:r4 {:optional true} ::sm/safe-number]
;; [:opacity {:optional true} ::sm/safe-number]
;; [:grids {:optional true}
;; [:vector {:gen/max 2} ::ctg/grid]]
;; [:exports {:optional true}
;; [:vector {:gen/max 2} ::ctse/export]]
;; [:strokes {:optional true}
;; [:vector {:gen/max 2} schema:stroke]]
;; [:blend-mode {:optional true}
;; [::sm/one-of blend-modes]]
[:map {:title "ShapeAttrs"}
[:page-id {:optional true} ::sm/uuid]
[:component-id {:optional true} ::sm/uuid]
[:component-file {:optional true} ::sm/uuid]
[:component-root {:optional true} :boolean]
[:main-instance {:optional true} :boolean]
[:remote-synced {:optional true} :boolean]
[:shape-ref {:optional true} ::sm/uuid]
[:touched {:optional true} [:maybe [:set :keyword]]]
[:blocked {:optional true} :boolean]
[:collapsed {:optional true} :boolean]
[:locked {:optional true} :boolean]
[:hidden {:optional true} :boolean]
[:masked-group {:optional true} :boolean]
[:fills {:optional true}
[:vector {:gen/max 2} schema:fill]]
[:proportion {:optional true} ::sm/safe-number]
[:proportion-lock {:optional true} :boolean]
[:constraints-h {:optional true}
[::sm/one-of horizontal-constraint-types]]
[:constraints-v {:optional true}
[::sm/one-of vertical-constraint-types]]
[:fixed-scroll {:optional true} :boolean]
[:r1 {:optional true} ::sm/safe-number]
[:r2 {:optional true} ::sm/safe-number]
[:r3 {:optional true} ::sm/safe-number]
[:r4 {:optional true} ::sm/safe-number]
[:opacity {:optional true} ::sm/safe-number]
[:grids {:optional true}
[:vector {:gen/max 2} ::ctg/grid]]
[:exports {:optional true}
[:vector {:gen/max 2} ::ctse/export]]
[:strokes {:optional true}
[:vector {:gen/max 2} schema:stroke]]
[:blend-mode {:optional true}
[::sm/one-of blend-modes]]
[:interactions {:optional true}
[:vector {:gen/max 2} ::ctsi/interaction]]
;; [:shadow {:optional true}
;; [:vector {:gen/max 1} ctss/schema:shadow]]
;; [:blur {:optional true} ::ctsb/blur]
[:shadow {:optional true}
[:vector {:gen/max 1} ctss/schema:shadow]]
[:blur {:optional true} ::ctsb/blur]
[:grow-type {:optional true}
[::sm/one-of grow-types]]
;; [:applied-tokens {:optional true} cto/schema:applied-tokens]
[:applied-tokens {:optional true} cto/schema:applied-tokens]
[:plugin-data {:optional true} ::ctpg/plugin-data]])
(def schema:group-attrs
@@ -306,15 +306,6 @@
(merge attrs1 shape attrs2 attrs3)))))
(sg/fmap create-shape)))
(def kaka
[:merge {:title "BoolShape"}
ctsl/schema:layout-child-attrs
schema:bool-attrs
schema:shape-generic-attrs
schema:shape-base-attrs])
(def schema:shape-attrs
[:multi {:dispatch :type
:decode/json (fn [shape]

View File

@@ -175,23 +175,21 @@
[:url :string]])
(def schema:interaction
[:schema {:title "Interaction"
:gen/gen (sg/one-of (sg/generator schema:navigate-interaction)
(sg/generator schema:open-overlay-interaction)
(sg/generator schema:close-overlay-interaction)
(sg/generator schema:toggle-overlay-interaction)
(sg/generator schema:prev-scren-interaction)
(sg/generator schema:open-url-interaction))}
[:and
schema:interaction-attrs
[:multi {:dispatch :action-type}
;; [:navigate schema:navigate-interaction]
;; [:open-overlay schema:open-overlay-interaction]
;; [:toggle-overlay schema:toggle-overlay-interaction]
;; [:close-overlay schema:close-overlay-interaction]
;; [:prev-screen schema:prev-scren-interaction]
[:open-url schema:open-url-interaction]
]]])
[:and {:title "Interaction"
:gen/gen (sg/one-of (sg/generator schema:navigate-interaction)
(sg/generator schema:open-overlay-interaction)
(sg/generator schema:close-overlay-interaction)
(sg/generator schema:toggle-overlay-interaction)
(sg/generator schema:prev-scren-interaction)
(sg/generator schema:open-url-interaction))}
schema:interaction-attrs
[:multi {:dispatch :action-type}
[:navigate schema:navigate-interaction]
[:open-overlay schema:open-overlay-interaction]
[:toggle-overlay schema:toggle-overlay-interaction]
[:close-overlay schema:close-overlay-interaction]
[:prev-screen schema:prev-scren-interaction]
[:open-url schema:open-url-interaction]]])
(sm/register! ::interaction schema:interaction)

View File

@@ -8,7 +8,6 @@
(:require
[app.common.data :as d]
[app.common.schema :as sm]
[app.common.schema.desc-js-like :as smdj]
[clojure.data :as data]
[clojure.set :as set]
[malli.util :as mu]))
@@ -52,8 +51,7 @@
(into #{} (keys token-type->dtcg-token-type)))
(def token-name-ref
[:schema {:title "TokenNameRef"}
[:and :string [:re #"^(?!\$)([a-zA-Z0-9-$_]+\.?)*(?<!\.)$"]]])
[:and :string [:re #"^(?!\$)([a-zA-Z0-9-$_]+\.?)*(?<!\.)$"]])
(def ^:private schema:color
[:map
@@ -63,7 +61,7 @@
(def color-keys (schema-keys schema:color))
(def ^:private schema:border-radius
[:map {:title "BorderRadiusTokenAttrs"}
[:map
[:r1 {:optional true} token-name-ref]
[:r2 {:optional true} token-name-ref]
[:r3 {:optional true} token-name-ref]
@@ -78,7 +76,7 @@
(def stroke-width-keys (schema-keys schema:stroke-width))
(def ^:private schema:sizing
[:map {:title "SizingTokenAttrs"}
[:map
[:width {:optional true} token-name-ref]
[:height {:optional true} token-name-ref]
[:layout-item-min-w {:optional true} token-name-ref]
@@ -89,46 +87,44 @@
(def sizing-keys (schema-keys schema:sizing))
(def ^:private schema:opacity
[:map {:title "OpacityTokenAttrs"}
[:map
[:opacity {:optional true} token-name-ref]])
(def opacity-keys (schema-keys schema:opacity))
(def ^:private schema:spacing-gap
[:map {:title "SpacingGapTokenAttrs"}
[:map
[:row-gap {:optional true} token-name-ref]
[:column-gap {:optional true} token-name-ref]])
(def ^:private schema:spacing-padding
[:map {:title "SpacingPaddingTokenAttrs"}
[:map
[:p1 {:optional true} token-name-ref]
[:p2 {:optional true} token-name-ref]
[:p3 {:optional true} token-name-ref]
[:p4 {:optional true} token-name-ref]])
(def ^:private schema:spacing-margin
[:map {:title "SpacingMarginTokenAttrs"}
[:map
[:m1 {:optional true} token-name-ref]
[:m2 {:optional true} token-name-ref]
[:m3 {:optional true} token-name-ref]
[:m4 {:optional true} token-name-ref]])
(def ^:private schema:spacing
(-> (reduce mu/union [schema:spacing-gap
schema:spacing-padding
schema:spacing-margin])
(mu/update-properties assoc :title "SpacingTokenAttrs")))
(reduce mu/union [schema:spacing-gap
schema:spacing-padding
schema:spacing-margin]))
(def spacing-margin-keys (schema-keys schema:spacing-margin))
(def spacing-keys (schema-keys schema:spacing))
(def ^:private schema:dimensions
(-> (reduce mu/union [schema:sizing
schema:spacing
schema:stroke-width
schema:border-radius])
(mu/update-properties assoc :title "DimensionsTokenAttrs")))
(reduce mu/union [schema:sizing
schema:spacing
schema:stroke-width
schema:border-radius]))
(def dimensions-keys (schema-keys schema:dimensions))
@@ -139,20 +135,22 @@
(def axis-keys (schema-keys schema:axis))
(def ^:private schema:rotation
[:map {:title "RotationTokenAttrs"}
[:map
[:rotation {:optional true} token-name-ref]])
(def rotation-keys (schema-keys schema:rotation))
(def ^:private schema:font-size
[:map {:title "FontSizeTokenAttrs"}
[:map
[:font-size {:optional true} token-name-ref]])
(def font-size-keys (schema-keys schema:font-size))
(def ^:private schema:letter-spacing
[:map {:title "LetterSpacingTokenAttrs"}
[:map
[:letter-spacing {:optional true} token-name-ref]])
(def letter-spacing-keys (schema-keys schema:letter-spacing))
@@ -164,9 +162,8 @@
(def ff-typography-keys (set/difference typography-keys font-size-keys))
(def ^:private schema:number
(-> (reduce mu/union [[:map [:line-height {:optional true} token-name-ref]]
schema:rotation])
(mu/update-properties assoc :title "NumberTokenAttrs")))
(reduce mu/union [[:map [:line-height {:optional true} token-name-ref]]
schema:rotation]))
(def number-keys (schema-keys schema:number))
@@ -183,10 +180,10 @@
number-keys))
(def ^:private schema:tokens
[:map {:title "GenericTokenAttrs"}])
[:map {:title "Applied Tokens"}])
(def schema:applied-tokens
[:merge {:title "AppliedTokens"}
[:merge
schema:tokens
schema:border-radius
schema:sizing

View File

@@ -472,17 +472,18 @@
(get-ordered-set-names [_] "get an ordered sequence of all sets names in the library")
(get-set [_ set-name] "get one set looking for name"))
(def ^:private schema:token-set-node
[:schema {:registry {::node
[:or [:fn token-set?]
[:and
[:map-of {:gen/max 5} :string [:ref ::node]]
[:fn d/ordered-map?]]]}}
(def schema:token-set-node
[:schema {:registry {::node [:or [:fn token-set?]
[:and
[:map-of {:gen/max 5} :string [:ref ::node]]
[:fn d/ordered-map?]]]}}
[:ref ::node]])
(def ^:private schema:token-sets
[:and {:title "TokenSets"}
[:map-of :string schema:token-set-node]
(def schema:token-sets
[:and
[:map-of {:title "TokenSets"}
:string
schema:token-set-node]
[:fn d/ordered-map?]])
(def ^:private check-token-sets

View File

@@ -103,6 +103,11 @@ If you are deploying Penpot on OpenShift, we recommend following the specific gu
Make sure to review the section **OpenShift Requirements** for important security and compatibility considerations.
### Using Rancher?
If you are deploying Penpot on Rancher, we recommend following the specific guidelines provided in the official documentation:
<a href="https://docs.apps.rancher.io/reference-guides/penpot/" target="_blank">Reference guides / Penpot</a>.
## Upgrade Penpot
When a new version of Penpot's chart is released, or when you want to change the

View File

@@ -501,16 +501,16 @@
profile (mf/deref refs/profile)
auth-error? (= type :authentication)
not-found? (= type :not-found)
authenticated?
(is-authenticated? profile)
request-access?
(and
(or (= type :not-found) auth-error?)
(or workspace? dashboard? view?)
(or (:file-id info)
(:team-id info)))]
(or (some? (:file-id info))
(some? (:team-id info))))]
(mf/with-effect [params info]
(when-not (:loaded info)
@@ -518,25 +518,26 @@
(rx/subs! (partial reset! info*)
(partial reset! info* {:loaded true})))))
(if (and auth-error? (not authenticated?))
[:> context-wrapper*
{:is-workspace workspace?
:is-dashboard dashboard?
:is-viewer view?
:profile profile}
[:> login-dialog* {}]]
(when (get info :loaded false)
(if request-access?
[:> context-wrapper* {:is-workspace workspace?
:is-dashboard dashboard?
:is-viewer view?
:profile profile}
[:> request-access* {:file-id (:file-id info)
:team-id (:team-id info)
:is-default (:team-default info)
:profile profile
:is-workspace workspace?}]]
[:> exception-section* props])))))
(if (or auth-error? not-found?)
(if (not authenticated?)
[:> context-wrapper*
{:is-workspace workspace?
:is-dashboard dashboard?
:is-viewer view?
:profile profile}
[:> login-dialog* {}]]
(when (get info :loaded false)
(if request-access?
[:> context-wrapper* {:is-workspace workspace?
:is-dashboard dashboard?
:is-viewer view?
:profile profile}
[:> request-access* {:file-id (:file-id info)
:team-id (:team-id info)
:is-default (:team-default info)
:profile profile
:is-workspace workspace?}]]
[:> exception-section* props])))
[:> exception-section* props])))