fix: correct variable name in canModifyAbsenceInPast method
gitea/salix/pipeline/pr-master There was a failure building this commit
Details
gitea/salix/pipeline/pr-master There was a failure building this commit
Details
This commit is contained in:
parent
b12c3bb72f
commit
50a95ed3c4
|
@ -28,9 +28,9 @@ module.exports = Self => {
|
||||||
|
|
||||||
Self.canModifyAbsenceInPast = async(ctx, time) => {
|
Self.canModifyAbsenceInPast = async(ctx, time) => {
|
||||||
const hasPrivs = await Self.app.models.ACL.checkAccessAcl(ctx, 'Worker', 'canModifyAbsenceInPast', 'WRITE');
|
const hasPrivs = await Self.app.models.ACL.checkAccessAcl(ctx, 'Worker', 'canModifyAbsenceInPast', 'WRITE');
|
||||||
const now = Date.vnNew();
|
const today = Date.vnNew();
|
||||||
now.setHours(0, 0, 0, 0);
|
today.setHours(0, 0, 0, 0);
|
||||||
return hasPrivs || now.getTime() < time;
|
return hasPrivs || today.getTime() < time;
|
||||||
};
|
};
|
||||||
|
|
||||||
async function tinIsValid(err, done) {
|
async function tinIsValid(err, done) {
|
||||||
|
|
Loading…
Reference in New Issue