File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,10 @@ export const selectCanUpdateCheckinsPermission = hasPermission(
206206 'CAN_UPDATE_CHECKINS'
207207) ;
208208
209+ export const selectCanCreateCheckinsPermission = hasPermission (
210+ 'CAN_CREATE_CHECKINS'
211+ ) ;
212+
209213export const selectCanUpdateAllCheckinsPermission = hasPermission (
210214 'CAN_UPDATE_ALL_CHECKINS'
211215) ;
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import {
1313 selectProfile ,
1414 selectCheckinsForMember ,
1515 selectCanViewCheckinsPermission ,
16+ selectCanCreateCheckinsPermission ,
1617 selectCanUpdateCheckinsPermission ,
1718 selectCanViewPrivateNotesPermission ,
1819 selectCanUpdateAllCheckinsPermission ,
@@ -159,7 +160,8 @@ const CheckinsPage = () => {
159160 aria-describedby = "checkin-tooltip-wrapper"
160161 className = "create-checkin-tooltip-wrapper"
161162 >
162- { ( updateAll || isPdl || currentUserId === memberId ) && (
163+ { ( updateAll || isPdl || currentUserId === memberId ) &&
164+ selectCanCreateCheckinsPermission ( state ) && (
163165 < Button
164166 disabled = { hasOpenCheckins }
165167 className = { classes . addButton }
You can’t perform that action at this time.
0 commit comments