diff --git a/src/com/android/settings/wifi/WifiDialogActivity.java b/src/com/android/settings/wifi/WifiDialogActivity.java
index 67f291d..ca7d80f 100644
--- a/src/com/android/settings/wifi/WifiDialogActivity.java
+++ b/src/com/android/settings/wifi/WifiDialogActivity.java
@@ -17,6 +17,8 @@
 package com.android.settings.wifi;
 
 import static android.Manifest.permission.ACCESS_FINE_LOCATION;
+import static android.os.UserManager.DISALLOW_ADD_WIFI_CONFIG;
+import static android.os.UserManager.DISALLOW_CONFIG_WIFI;
 
 import android.content.DialogInterface;
 import android.content.Intent;
@@ -31,6 +33,7 @@
 import android.os.Process;
 import android.os.SimpleClock;
 import android.os.SystemClock;
+import android.os.UserManager;
 import android.text.TextUtils;
 import android.util.EventLog;
 import android.util.Log;
@@ -115,6 +118,10 @@
         }
 
         super.onCreate(savedInstanceState);
+        if (!isConfigWifiAllowed() || !isAddWifiConfigAllowed()) {
+            finish();
+            return;
+        }
 
         mIsWifiTrackerLib = !TextUtils.isEmpty(mIntent.getStringExtra(KEY_CHOSEN_WIFIENTRY_KEY));
 
@@ -361,6 +368,29 @@
         }
     }
 
+    @VisibleForTesting
+    boolean isConfigWifiAllowed() {
+        UserManager userManager = getSystemService(UserManager.class);
+        if (userManager == null) return true;
+        final boolean isConfigWifiAllowed = !userManager.hasUserRestriction(DISALLOW_CONFIG_WIFI);
+        if (!isConfigWifiAllowed) {
+            Log.e(TAG, "The user is not allowed to configure Wi-Fi.");
+            EventLog.writeEvent(0x534e4554, "226133034", getApplicationContext().getUserId(),
+                    "The user is not allowed to configure Wi-Fi.");
+        }
+        return isConfigWifiAllowed;
+    }
+
+    @VisibleForTesting
+    boolean isAddWifiConfigAllowed() {
+        UserManager userManager = getSystemService(UserManager.class);
+        if (userManager != null && userManager.hasUserRestriction(DISALLOW_ADD_WIFI_CONFIG)) {
+            Log.e(TAG, "The user is not allowed to add Wi-Fi configuration.");
+            return false;
+        }
+        return true;
+    }
+
     private boolean hasWifiManager() {
         if (mWifiManager != null) return true;
         mWifiManager = getSystemService(WifiManager.class);
diff --git a/tests/robotests/src/com/android/settings/wifi/WifiDialogActivityTest.java b/tests/robotests/src/com/android/settings/wifi/WifiDialogActivityTest.java
index 4ceb1e3..97cf783 100644
--- a/tests/robotests/src/com/android/settings/wifi/WifiDialogActivityTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/WifiDialogActivityTest.java
@@ -18,6 +18,8 @@
 
 import static android.Manifest.permission.ACCESS_COARSE_LOCATION;
 import static android.Manifest.permission.ACCESS_FINE_LOCATION;
+import static android.os.UserManager.DISALLOW_ADD_WIFI_CONFIG;
+import static android.os.UserManager.DISALLOW_CONFIG_WIFI;
 
 import static com.android.settings.wifi.WifiDialogActivity.REQUEST_CODE_WIFI_DPP_ENROLLEE_QR_CODE_SCANNER;
 import static com.android.settings.wifi.WifiDialogActivity.RESULT_CONNECTED;
@@ -36,6 +38,7 @@
 import android.content.pm.PackageManager;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiManager;
+import android.os.UserManager;
 
 import com.android.settings.testutils.FakeFeatureFactory;
 import com.android.settingslib.wifi.AccessPoint;
@@ -58,6 +61,8 @@
     static final int REQUEST_CODE = REQUEST_CODE_WIFI_DPP_ENROLLEE_QR_CODE_SCANNER;
 
     @Mock
+    UserManager mUserManager;
+    @Mock
     PackageManager mPackageManager;
     @Mock
     WifiManager mWifiManager;
@@ -92,6 +97,7 @@
         FakeFeatureFactory.setupForTest();
 
         mActivity = spy(Robolectric.setupActivity(WifiDialogActivity.class));
+        when(mActivity.getSystemService(UserManager.class)).thenReturn(mUserManager);
         when(mActivity.getSystemService(WifiManager.class)).thenReturn(mWifiManager);
     }
 
@@ -212,6 +218,34 @@
     }
 
     @Test
+    public void isConfigWifiAllowed_hasNoUserRestriction_returnTrue() {
+        when(mUserManager.hasUserRestriction(DISALLOW_CONFIG_WIFI)).thenReturn(false);
+
+        assertThat(mActivity.isConfigWifiAllowed()).isTrue();
+    }
+
+    @Test
+    public void isConfigWifiAllowed_hasUserRestriction_returnFalse() {
+        when(mUserManager.hasUserRestriction(DISALLOW_CONFIG_WIFI)).thenReturn(true);
+
+        assertThat(mActivity.isConfigWifiAllowed()).isFalse();
+    }
+
+    @Test
+    public void isAddWifiConfigAllowed_hasNoUserRestriction_returnTrue() {
+        when(mUserManager.hasUserRestriction(DISALLOW_ADD_WIFI_CONFIG)).thenReturn(false);
+
+        assertThat(mActivity.isAddWifiConfigAllowed()).isTrue();
+    }
+
+    @Test
+    public void isAddWifiConfigAllowed_hasUserRestriction_returnFalse() {
+        when(mUserManager.hasUserRestriction(DISALLOW_ADD_WIFI_CONFIG)).thenReturn(true);
+
+        assertThat(mActivity.isAddWifiConfigAllowed()).isFalse();
+    }
+
+    @Test
     public void hasPermissionForResult_noCallingPackage_returnFalse() {
         when(mActivity.getCallingPackage()).thenReturn(null);
 
