使用chrome.management API禁用应用程序 [英] Disabling apps using the chrome.management API

查看:125
本文介绍了使用chrome.management API禁用应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好像Chrome中发生了一些变化,通过设置 ExtensionInfo 对象的属性启用属性并通过 chrome.management.setEnabled()变得毫无意义。



应用程序图标在chrome:// apps中灰显,但点击灰色图标会自动启用,这些方法不再支配应用程序的状态。 (但它对扩展仍然正常工作)

我还注意到,应用程序不再显示在chrome:// extensions中。



是否有任何其他未公开的方式让应用程序保持禁用状态,直到状态被扩展名切换为止? 方案

行为按预期工作。 chrome.management.setEnabled()并不意味着是永久的策略操作;它只是相当于取消选中chrome://扩展名列表中或 Chrome Apps开发者工具。由于对应用程序图标点击的最合理的解释是用户想要运行该应用程序,因此无论应用程序是启用还是禁用,系统都会尊重该请求。



然后,您可能想知道,如果应用程序不阻止用户运行应用程序,启用概念对于应用程序意味着什么。它有一个特定的含义:该项目处于未加载状态,以便其后台页面无法运行以注册事件侦听器或执行其他工作。该州的一个目的是帮助追踪具有不良行为的应用程序和扩展程序的问题,而不会经历卸载和重新安装它们的麻烦。如果一个项目被禁用,那么你就知道它不会再影响你的系统了,所以将不良行为归入该项目(或者将其排除为罪魁祸首)要容易得多。



如果您想停止启动应用程序,请将其卸载或停止点击。如果您想阻止其他人启动您的应用,请不要让他们使用您的个人资料,而是引导他们设置自己的系统级用户或Chrome用户,或者让他们在Chromebook上使用访客模式。如果您想阻止其他人启动他们的应用,请查看 Chrome for Business ,它允许您在合法控制的计算机上执行管理员策略。如果Chrome for Business没有意义(例如,因为您是家长,希望阻止您的孩子在计算机上对某些内容进行混淆),请尝试 Chrome监督用户,这是专门为这种情况设计的。

如果这些解决方案都不适合你,那么你可能需要重新检查你的动机。您需要进行轻量级操作(安装Chrome应用),以便永久更改用户系统(禁用其他应用并阻止其重新启用)。为什么会有用户需要?


Seems like something changed in Chrome, disabling apps via setting the enabled property of the ExtensionInfo object and via chrome.management.setEnabled() becomes meaningless.

The app icon does grey out in chrome://apps but clicking the grey out icon enables it automatically, the methods does not govern the state of the apps anymore. (But it still works fine for extensions)

I also noticed that apps no longer show up in chrome://extensions.

Is there any other undocumented way to get apps to stay disabled until the state is toggled by an extension?

解决方案

The behavior is working as intended. chrome.management.setEnabled() isn't meant to be a permanent policy operation; it's simply the equivalent of unchecking the "enabled" checkbox in the chrome://extensions list or in the Chrome Apps Developer Tool. Because the most reasonable interpretation of a click on an app icon is that the user wants to run the app, the system honors that request regardless of whether the app is enabled or disabled.

You might be wondering, then, what the "enabled" concept means for apps if it doesn't stop the user from running them. It does have a specific meaning: the item is in an unloaded state, so that its background page(s) cannot run to register event listeners or do other work. One purpose of the state is to help track down issues with poorly-behaved apps and extensions without going through the trouble of uninstalling and reinstalling them. If an item is disabled, then you know it can't be affecting your system anymore, so it's much easier to attribute bad behavior to that item (or else rule it out as the culprit).

If you want to stop yourself from launching an app, either uninstall it or stop clicking it. If you want to stop others from launching your apps, don't let them use your profile and instead guide them to setting up their own system-level user or Chrome user, or else let them use Guest Mode on a Chromebook. If you want to stop others from launching their apps, look into Chrome for Business, which lets you enforce administrator policies on machines that you legitimately control. If Chrome for Business doesn't make sense (for example because you're a parent simply wishing to stop your kids from messing around with certain things on your computer), try Chrome Supervised Users, which is designed specifically for that case.

Finally, if none of these solutions works for you, then you might want to re-examine your motives. You're asking for a lightweight operation (installing a Chrome App) to lead to a permanent change to the user's system (disabling other apps and preventing them from being re-enabled). Why would a user want that?

这篇关于使用chrome.management API禁用应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆