public function setAssetRules($element, $rules)
	{
		if ($this->baseDb->tableExists('#__assets'))
		{
			$asset = \Hubzero\Access\Asset::oneByName($element);
			if (!$asset || !$asset->get('id'))
			{
				return false;
			}

			// Loop through and map textual groups to ids (if applicable)
			foreach ($rules as $idx => $rule)
			{
				foreach ($rule as $group => $value)
				{
					if (!is_numeric($group))
					{
						$query = "SELECT `id` FROM `#__usergroups` WHERE `title` = " . $this->baseDb->quote($group);
						$this->baseDb->setQuery($query);
						if ($id = $this->baseDb->loadResult())
						{
							unset($rules[$idx][$group]);
							$rules[$idx][$id] = $value;
						}
					}
				}
			}

			$asset->set('rules', json_encode($rules));
			$asset->save();
		}
	}