This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Security.Principal; | |
using System.Threading; | |
using System.Web; | |
using Telerik.Sitefinity.Security; | |
using Telerik.Sitefinity.Security.Model; | |
using Telerik.Sitefinity.Services; | |
namespace Telerik.Sitefinity.TestUtilities.CommonOperations.Permissions.Api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Document UploadFile(string fileTitle, Stream fileStream, string fileExtension, DocumentLibrary album, Guid folderId, List<Guid> categories, List<Guid> tags, string provider = "") | |
{ | |
if (album != null) | |
{ | |
LibrariesManager manager = LibrariesManager.GetManager(provider); | |
manager.Provider.SuppressSecurityChecks = true; | |
string urlname = Util.UrlNameFilter(fileTitle); | |
Document document = null; | |
//Check for document |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Telerik.Sitefinity; | |
using Telerik.Sitefinity.Model; | |
using Telerik.Sitefinity.DynamicModules; | |
using Telerik.Sitefinity.Data.Linq.Dynamic; | |
using Telerik.Sitefinity.Services.Search; | |
using Telerik.Sitefinity.Utilities.TypeConverters; | |
using ServiceStack.Text; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wireUpGADocumentTracking() { | |
if ($("body.sfPageEditor").length == 0) { | |
var filetypes = /\.(zip|exe|dmg|pdf|doc.*|xls.*|ppt.*|mp3|txt|rar|wma|mov|avi|wmv|flv|wav)$/i; | |
var baseHref = ''; | |
if (jQuery('base').attr('href') != undefined) baseHref = jQuery('base').attr('href'); | |
var hrefRedirect = ''; | |
jQuery('#content-wrapper').on('click', 'a', function (event) { | |
var el = jQuery(this); | |
var track = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<root> | |
<modules> | |
<module name="RadEditorStatistics" dockingZone="Bottom" visible="false" /> | |
<module name="RadEditorDomInspector" visible="true" /> | |
<module name="RadEditorNodeInspector" visible="false" /> | |
<module name="RadEditorHtmlInspector" visible="false" /> | |
</modules> | |
<tools name="MainToolbar"> | |
<tool name="ToggleAdvancedToolbars" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private const string ExecuteDataIntelligenceSubmitScriptFormat = "(function() {{\r\n var jqueryXhrModified = false;\r\n var detectjs = false;\r\n var executeDataIntelligenceScript = function() {{\r\n var source;\r\n if (!window.JSON) {{\r\n source = '{0}';\r\n }} else if (!window.jQuery) {{\r\n source = '{1}';\r\n }} else if (!jqueryXhrModified) {{\r\n source = '{2}';\r\n jqueryXhrModified = true;\r\n }} else if (!detectjs) {{\r\n source = '{3}';\r\n detectjs = true;\r\n }} else if (!window.DataIntelligenceSubmitScript) {{\r\n source = '{4}';\r\n }} else if (!window.sfDataIntell) {{\r\n source = '{5}';\r\n }} else {{\r\n return DataIntelligenceSubmitScript.load({6});\r\n }}\r\n var script = document.createElement('script');\r\n script.type = 'text/javascript';\r\n var callback = function() {{\r\n if (!this.rea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Telerik.Sitefinity; | |
using Telerik.Sitefinity.Model; | |
using Telerik.Sitefinity.DynamicModules; | |
using Telerik.Sitefinity.Data.Linq.Dynamic; | |
using Telerik.Sitefinity.Services.Search; | |
using Telerik.Sitefinity.Utilities.TypeConverters; | |
using ServiceStack.Text; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Download.aspx.cs" Inherits="SitefinityWebApp.Download" %> | |
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head runat="server"> | |
<title></title> | |
<script type="text/javascript"> | |
var max_time = 5; | |
var cinterval; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void Application_Error() | |
{ | |
//Sitefinity Logger should send to raygun now | |
var exception = Server.GetLastError(); | |
//Send document requests over to login | |
if(exception.Message.Contains("You are not authorized to 'View document'") || exception.Message.Contains("You are not authorized to 'View image'")){ | |
if (!ClaimsManager.GetCurrentIdentity().IsAuthenticated) | |
{ | |
//If user is anonymous, send them to the login |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<rule name="Default Document" stopProcessing="true"> | |
<match url="(.*)" ignoreCase="true" /> | |
<conditions logicalGrouping="MatchAny" trackAllCaptures="false"> | |
<add input="{REQUEST_URI}" pattern="^\/home$" /> | |
<add input="{REQUEST_URI}" pattern="^\/default.aspx$" /> | |
</conditions> | |
<action type="Redirect" url="/" appendQueryString="false" redirectType="Permanent" /> | |
</rule> | |
<rule name="RedirectToWWW" enabled="true" stopProcessing="true"> | |
<match url=".*" /> |