mirror of
https://github.com/penpot/penpot.git
synced 2026-09-10 14:09:17 +00:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
1c14c854ae
@ -620,9 +620,6 @@
|
|||||||
(some? (:external-session-id state))
|
(some? (:external-session-id state))
|
||||||
(assoc :external-session-id (:external-session-id state))
|
(assoc :external-session-id (:external-session-id state))
|
||||||
|
|
||||||
(some? (:token/expires-in tdata))
|
|
||||||
(assoc :sso-token-exp (ct/in-future {:seconds (:token/expires-in tdata)}))
|
|
||||||
|
|
||||||
;; If state token comes with props, merge them. The state token
|
;; If state token comes with props, merge them. The state token
|
||||||
;; props can contain pm_ and utm_ prefixed query params.
|
;; props can contain pm_ and utm_ prefixed query params.
|
||||||
(map? (:props state))
|
(map? (:props state))
|
||||||
@ -906,9 +903,9 @@
|
|||||||
(let [organization-id (:organization-id state)
|
(let [organization-id (:organization-id state)
|
||||||
sso (nitrate/call cfg :get-organization-sso {:organization-id organization-id})
|
sso (nitrate/call cfg :get-organization-sso {:organization-id organization-id})
|
||||||
provider (prepare-organization-sso-provider cfg sso)
|
provider (prepare-organization-sso-provider cfg sso)
|
||||||
info (get-info cfg provider state code)
|
_info (get-info cfg provider state code)
|
||||||
session (session/get-session request)
|
session (session/get-session request)
|
||||||
exp (or (:sso-token-exp info) (ct/in-future {:hours 48}))]
|
exp (ct/in-future {:minutes 15})]
|
||||||
(when (and session organization-id)
|
(when (and session organization-id)
|
||||||
(let [props (-> (or (:props session) {})
|
(let [props (-> (or (:props session) {})
|
||||||
(update :sso assoc organization-id exp))]
|
(update :sso assoc organization-id exp))]
|
||||||
|
|||||||
@ -460,6 +460,10 @@
|
|||||||
[cfg {:keys [::rpc/profile-id team-id role emails] :as params}]
|
[cfg {:keys [::rpc/profile-id team-id role emails] :as params}]
|
||||||
(let [perms (teams/get-permissions cfg profile-id team-id)
|
(let [perms (teams/get-permissions cfg profile-id team-id)
|
||||||
profile (db/get-by-id cfg :profile profile-id)
|
profile (db/get-by-id cfg :profile profile-id)
|
||||||
|
team (db/get-by-id cfg :team team-id)
|
||||||
|
team-with-org (when (contains? cf/flags :admin-console)
|
||||||
|
(nitrate/add-organization-info-to-team cfg team {}))
|
||||||
|
organization (:organization team-with-org)
|
||||||
;; Determine which format is being used
|
;; Determine which format is being used
|
||||||
using-emails-format? (and emails role)
|
using-emails-format? (and emails role)
|
||||||
;; Handle both parameter formats
|
;; Handle both parameter formats
|
||||||
@ -475,6 +479,17 @@
|
|||||||
(ex/raise :type :validation
|
(ex/raise :type :validation
|
||||||
:code :insufficient-permissions))
|
:code :insufficient-permissions))
|
||||||
|
|
||||||
|
(when (and (contains? cf/flags :admin-console)
|
||||||
|
organization
|
||||||
|
(not (cto/allowed? :send-invitations
|
||||||
|
{:organization-perms {:owner-id (:owner-id organization)
|
||||||
|
:permissions (:permissions organization)}
|
||||||
|
:profile-id profile-id
|
||||||
|
:team-perms perms})))
|
||||||
|
(ex/raise :type :validation
|
||||||
|
:code :insufficient-permissions
|
||||||
|
:hint "Organization policy does not allow you to send invitations"))
|
||||||
|
|
||||||
(when (> invitation-count max-invitations-by-request-threshold)
|
(when (> invitation-count max-invitations-by-request-threshold)
|
||||||
(ex/raise :type :validation
|
(ex/raise :type :validation
|
||||||
:code :max-invitations-by-request
|
:code :max-invitations-by-request
|
||||||
|
|||||||
@ -699,12 +699,13 @@
|
|||||||
grid-template-columns: 1fr auto auto;
|
grid-template-columns: 1fr auto auto;
|
||||||
gap: var(--sp-s);
|
gap: var(--sp-s);
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0 px2rem(10);
|
padding: 0 0 0 px2rem(10);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.current-organization-no-options {
|
.current-organization-no-options {
|
||||||
gap: 0;
|
gap: 0;
|
||||||
|
padding: 0 px2rem(8) 0 px2rem(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
.current-organization .arrow-icon {
|
.current-organization .arrow-icon {
|
||||||
@ -734,11 +735,15 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: $sz-48;
|
width: $sz-28;
|
||||||
height: $sz-48;
|
height: 100%;
|
||||||
|
padding: 0;
|
||||||
|
border-radius: 0 $br-8 $br-8 0;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
--icon-stroke: var(--color-accent-primary);
|
--icon-stroke: var(--color-accent-primary);
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user