diff --git a/apps/acls/models/base.py b/apps/acls/models/base.py index 24857280f..c29fec096 100644 --- a/apps/acls/models/base.py +++ b/apps/acls/models/base.py @@ -13,6 +13,7 @@ __all__ = [ ] from orgs.utils import tmp_to_root_org +from orgs.utils import tmp_to_org class ActionChoices(models.TextChoices): @@ -116,7 +117,8 @@ class UserAssetAccountBaseACL(OrgModelMixin, UserBaseACL): queryset = queryset.filter(q) if asset: org_id = asset.org_id - q = cls.assets.get_filter_q(asset) + with tmp_to_org(org_id): + q = cls.assets.get_filter_q(asset) queryset = queryset.filter(q) if account and not account_username: account_username = account.username diff --git a/apps/terminal/applets/chrome/extensions/disable_new_tab_window_menu/content_script.js b/apps/terminal/applets/chrome/extensions/disable_new_tab_window_menu/content_script.js index b09cb7531..0b6162430 100644 --- a/apps/terminal/applets/chrome/extensions/disable_new_tab_window_menu/content_script.js +++ b/apps/terminal/applets/chrome/extensions/disable_new_tab_window_menu/content_script.js @@ -40,9 +40,9 @@ document.addEventListener("contextmenu", function (event) { event.preventDefault(); }); -var AllowedKeys = ['P', 'F', 'p', 'f'] +var AllowedKeys = ['P', 'F', 'C', 'V'] window.addEventListener("keydown", function (e) { - if (e.key === "F12" || (e.ctrlKey && !AllowedKeys.includes(e.key))) { + if (e.key === "F12" || (e.ctrlKey && !AllowedKeys.includes(e.key.toUpperCase()))) { e.preventDefault(); e.stopPropagation(); console.log('Press key: ', e.ctrlKey ? 'Ctrl' : '', e.shiftKey ? ' Shift' : '', e.key)