mirror of
https://github.com/penpot/penpot.git
synced 2025-06-01 21:31:40 +02:00
✨ Add improved abstraction for team permissions
Relevant changes: - replace user-viewer? with can-edit removing many double negations on the code - always use team permissions making the permissions access uniform around all the code - expose team permissions to ui tree through ctx/team-permissions context
This commit is contained in:
parent
b3fcbd91e4
commit
d6da8afdce
29 changed files with 412 additions and 391 deletions
|
@ -20,7 +20,7 @@
|
|||
:current-page-id nil
|
||||
:workspace-data nil
|
||||
:workspace-libraries {}
|
||||
:features/team #{"components/v2"}})
|
||||
:features-team #{"components/v2"}})
|
||||
|
||||
(defn- on-error
|
||||
[cause]
|
||||
|
@ -33,6 +33,7 @@
|
|||
(let [state (-> initial-state
|
||||
(assoc :current-file-id (:id file)
|
||||
:current-page-id (cthf/current-page-id file)
|
||||
:permissions {:can-edit true}
|
||||
:workspace-file (dissoc file :data)
|
||||
:workspace-data (:data file)))
|
||||
store (ptk/store {:state state :on-error on-error})]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue