Skip to content

Commit

Permalink
Merge pull request #798 from OneCommunityGlobal/Roberto_fix_edit_time…
Browse files Browse the repository at this point in the history
…_entry_blue_square

Roberto-fixes logic to push to the edit time entry history
  • Loading branch information
one-community authored Mar 14, 2024
2 parents 49ae354 + df6db12 commit e97fa9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/controllers/timeEntryController.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ const timeEntrycontroller = function (TimeEntry) {
&& timeEntry.totalSeconds !== newTotalSeconds
&& timeEntry.isTangible
&& isForAuthUser
&& !(await hasPermission(req.body.requestor, 'editTimeEntry'))
&& (await hasPermission(req.body.requestor, 'editTimeEntry'))
&& (req.body.requestor.role !== 'Owner' && req.body.requestor.role !== 'Administrator')
) {
const requestor = await UserProfile.findById(
req.body.requestor.requestorId,
Expand Down

0 comments on commit e97fa9c

Please sign in to comment.