Restrict the ability to deactivate AAM

Restrict the ability to deactivate and edit the Advanced Access Manager plugin or any official AAM add-ons.

This policy restricts the ability to deactivate AAM plugin on the Plugins page, so now you can be sure that privileged users do not gain more control than needed.

{
    "Version": "1.0.0",
    "Dependency": {
        "wordpress": ">=5.0.0",
        "advanced-access-manager": ">=6.2.0"
    },
    "Statement": [
        {
            "Effect": "deny",
            "Resource": [
                "Plugin:advanced-access-manager",
                "Plugin:aam-plus-package",
                "Plugin:aam-complete-package",
                "Plugin:aam-role-hierarchy",
                "Plugin:aam-ip-check",
                "Plugin:aam-ecommerce"
            ],
            "Action": [
                "WP:deactivate",
                "WP:edit"
            ]
        }
    ]
}

Note! Keep in mind, that you would also want to restrict the ability for your users to edit physical files. There are several options here and the most easiest one is to revoke the capabilities edit_themes and edit_plugins.

POLICY ID
Copy this unique number and use it to install the policy on your website. To learn more how it works, follow this link.
DEPENDENCIES List of required plugins for this policy to work properly.
WordPress >=5.0.0
Advanced Access Manager >=6.2.0
ASSIGNEES The type of audience the policy is automatically applied to as well as excluded. To learn more how it works, follow this link

This policy does not apply to any role, user or visitors. You need to attach this policy to desired audience manually. Learn more here.