Skip to content

Commit

Permalink
[IMP] queue_job_batch: Fix systray icon visibility for allowed group …
Browse files Browse the repository at this point in the history
…users only
  • Loading branch information
JasminSForgeFlow committed Mar 18, 2024
1 parent 916e02e commit 68293db
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions queue_job_batch/static/src/js/systray_service.esm.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
/** @odoo-module **/

import {QueueJobBatchMenuContainer} from "./batch_menu_container_view.esm";

import {registry} from "@web/core/registry";
import session from "web.session";

const systrayRegistry = registry.category("systray");

export const systrayService = {
start() {
systrayRegistry.add(
"queue_job_batch.QueueJobBatchMenu",
{Component: QueueJobBatchMenuContainer},
{sequence: 99}
);
session
.user_has_group("queue_job_batch.group_queue_job_batch_user")
.then(function (has_group) {
if (has_group) {
systrayRegistry.add(
"queue_job_batch.QueueJobBatchMenu",
{Component: QueueJobBatchMenuContainer},
{sequence: 99}
);
}
});
},
};

Expand Down

0 comments on commit 68293db

Please sign in to comment.