Skip to content

Commit 662dd31

Browse files
committed
header: use a constant for the sudo session duration
1 parent 2891f1b commit 662dd31

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/components/header.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ import { action } from '@ember/object';
22
import { inject as service } from '@ember/service';
33
import Component from '@glimmer/component';
44

5+
// Six hours.
6+
const SUDO_SESSION_DURATION_MS = 6 * 60 * 60 * 1000;
7+
58
export default class Header extends Component {
69
/** @type {import("../services/session").default} */
710
@service session;
811

912
@action
1013
enableSudo() {
11-
// FIXME: hard coded six hour duration.
12-
this.session.setSudo(6 * 60 * 60 * 1000);
14+
this.session.setSudo(SUDO_SESSION_DURATION_MS);
1315
}
1416

1517
@action

0 commit comments

Comments
 (0)