@@ -73,6 +73,7 @@ const KanbanView = ({
7373 const { createDoc } = useCloudApi ( )
7474 const { translate } = useI18n ( )
7575 const { goToDocPreview, openNewDocForm } = useCloudResourceModals ( )
76+ const isViewEditable = currentUserIsCoreMember || view . smartViewId != null
7677
7778 const addListRef = useRef ( addList )
7879 useEffect ( ( ) => {
@@ -84,6 +85,7 @@ const KanbanView = ({
8485 openContextModal (
8586 ev ,
8687 < StatusSelector
88+ readOnly = { ! currentUserIsCoreMember }
8789 ignoredStatuses = { lists . map ( ( list ) => list . id ) }
8890 onSelect = { ( status ) => {
8991 addListRef . current ( status ?. id . toString ( ) || 'none' )
@@ -93,7 +95,7 @@ const KanbanView = ({
9395 { width : 200 , removePadding : true , keepAll : true }
9496 )
9597 } ,
96- [ openContextModal , closeLastModal , lists ]
98+ [ openContextModal , closeLastModal , currentUserIsCoreMember , lists ]
9799 )
98100
99101 const removeListRef = useRef ( removeList )
@@ -123,9 +125,9 @@ const KanbanView = ({
123125 name = { status ?. name || 'No Status' }
124126 backgroundColor = { status ?. backgroundColor }
125127 />
126- { currentUserIsCoreMember && (
128+ { isViewEditable && (
127129 < div className = { 'kanban__item--action-buttons' } >
128- { currentWorkspaceId != null && (
130+ { currentWorkspaceId != null && currentUserIsCoreMember && (
129131 < Button
130132 className = { 'kanban__item--action-button' }
131133 variant = { 'icon' }
@@ -176,6 +178,7 @@ const KanbanView = ({
176178 type = 'status'
177179 label = { status }
178180 onSave = { ( status ) => editStatus ( status ) }
181+ readOnly = { ! currentUserIsCoreMember }
179182 />
180183 < MetadataContainerBreak />
181184 </ >
@@ -207,6 +210,7 @@ const KanbanView = ({
207210 closeLastModal ,
208211 openNewDocForm ,
209212 currentUserIsCoreMember ,
213+ isViewEditable ,
210214 ]
211215 )
212216
@@ -286,7 +290,7 @@ const KanbanView = ({
286290 { viewsSelector }
287291 < Flexbox flex = '0 0 auto' >
288292 < Button
289- disabled = { ! currentUserIsCoreMember }
293+ disabled = { ! isViewEditable }
290294 variant = 'transparent'
291295 className = 'view--kanban__prop'
292296 onClick = { ( event ) =>
@@ -325,7 +329,7 @@ const KanbanView = ({
325329 view = { view }
326330 teamId = { team . id }
327331 properties = { view . data . props }
328- currentUserIsCoreMember = { currentUserIsCoreMember }
332+ isViewEditable = { isViewEditable }
329333 setProperties = { setProperties }
330334 /> ,
331335 {
@@ -352,7 +356,7 @@ const KanbanView = ({
352356 afterItems = { renderListFooter }
353357 afterLists = {
354358 < Button
355- disabled = { ! currentUserIsCoreMember }
359+ disabled = { ! isViewEditable }
356360 onClick = { openSelector }
357361 iconPath = { mdiPlus }
358362 variant = 'transparent'
0 commit comments