	public Template getTemplate(
		String templateId, String templateContent, String errorTemplateId,
		String errorTemplateContent, TemplateContextType templateContextType) {

		if (templateContextType.equals(TemplateContextType.EMPTY)) {
			return new FreeMarkerTemplate(
					templateId, templateContent, errorTemplateId,
					errorTemplateContent, null, _configuration,
					_templateContextHelper, _stringTemplateLoader);
		}
		else if (templateContextType.equals(TemplateContextType.RESTRICTED)) {
			return new RestrictedTemplate(
				new FreeMarkerTemplate(
					templateId, templateContent, errorTemplateId,
					errorTemplateContent, _restrictedHelperUtilities,
					_configuration, _templateContextHelper,
					_stringTemplateLoader),
				_templateContextHelper.getRestrictedVariables());
		}
		else if (templateContextType.equals(TemplateContextType.STANDARD)) {
			return new FreeMarkerTemplate(
				templateId, templateContent, errorTemplateId,
				errorTemplateContent, _standardHelperUtilities, _configuration,
				_templateContextHelper, _stringTemplateLoader);
		}

		return null;
	}
Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control.