public function GetAllowedPermissionNamespaces() {
      $ApplicationManager = new Gdn_ApplicationManager();
      $EnabledApplications = $ApplicationManager->EnabledApplications();
      
      $PluginNamespaces = array();
      foreach(Gdn::PluginManager()->EnabledPlugins() as $Plugin) {
         if(!array_key_exists('RegisterPermissions', $Plugin) || !is_array($Plugin['RegisterPermissions']))
            continue;
         foreach($Plugin['RegisterPermissions'] as $Index => $PermissionName) {
            if (is_string($Index))
               $PermissionName = $Index;
            
            $Namespace = substr($PermissionName, 0, strrpos($PermissionName, '.'));
            $PluginNamespaces[$Namespace] = TRUE;
         }
      }
      
      $Result = array_merge(array_keys($EnabledApplications), array_keys($PluginNamespaces));
		if(in_array('Dashboard', $Result))
			$Result[] = 'Garden';
		return $Result;
   }