Skip to content

Commit 668ce57

Browse files
committed
hide the option to create a daily event on the fly for non supervisory users
1 parent 63da0a0 commit 668ce57

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web/src/scans/Scanner.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { CHECKIN_SERVICE_ID } from '../constants';
2222
import { isMobileAttached, initiateMobileScan } from '../mobile';
2323
import { withContext } from '../shared/ContextProvider';
2424
import { getScanResult } from './scannerUtil';
25+
import { userCanView } from '../util';
2526
import ServiceList from '../services/ServiceList';
2627
import ScannerMenu from './ScannerMenu';
2728
import ScanDisplay from './ScanDisplay';
@@ -294,7 +295,7 @@ class Scanner extends Component {
294295
let dailyEvent = this.getDailyEvent();
295296
let dailyEventExists = events.find(e => e.name === dailyEvent.name);
296297

297-
if (dailyEventExists === undefined) {
298+
if (dailyEventExists === undefined && userCanView()) {
298299
events = events.concat(dailyEvent);
299300
}
300301

0 commit comments

Comments
 (0)