public void RegisterUrls(IUrlController controller) { const string guidConstraintRegex = @"^[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}"; object pollIdConstraints = new { PollId = guidConstraintRegex }; object answerIdConstraints = new { PollId = guidConstraintRegex, PollAnswerId = guidConstraintRegex }; controller.AddPage("polls_list", "polls", null, null, "polls", new PageDefinitionOptions() { DefaultPageXml = LoadPageXml("polls-Social-Groups-Page") }); controller.AddPage("polls_create", "polls/create", null, null, "createeditpoll", new PageDefinitionOptions() { DefaultPageXml = LoadPageXml("createeditpoll-Social-Groups-Page") }); controller.AddPage("polls_view", "polls/{PollId}", null, pollIdConstraints, "poll", new PageDefinitionOptions() { ParseContext = ParsePollContext, DefaultPageXml = LoadPageXml("poll-Social-Groups-Page") }); controller.AddPage("polls_edit", "polls/edit/{PollId}", null, pollIdConstraints, "createeditpoll", new PageDefinitionOptions() { ParseContext = ParsePollContext, DefaultPageXml = LoadPageXml("createeditpoll-Social-Groups-Page") }); controller.AddRaw("polls_vote", "polls/{PollId}/vote/{PollAnswerId}", null, answerIdConstraints, (a, p) => { HandlePollVote(a.ApplicationInstance.Context); }, new RawDefinitionOptions() { ParseContext = ParsePollContext }); }
public void RegisterUrls(IUrlController controller) { controller.AddRaw("samlresponse", "samlresponse", null, new { handlerHeader = new RequestTypeHandlerMethodConstraint("GET", "POST") }, (c, p) => { var handler = new SamlResponseHandler(); handler.ProcessRequest(c.ApplicationInstance.Context); }, new RawDefinitionOptions() ); controller.AddRaw("samlauthn", "samlauthn", null, new { handlerHeader = new RequestTypeHandlerMethodConstraint("GET", "POST") }, (c, p) => { var handler = new SamlAuthnHandler(); handler.ProcessRequest(c.ApplicationInstance.Context); }, new RawDefinitionOptions() ); controller.AddPage("saml-logout", "samllogout", null, null, "saml-logout", new PageDefinitionOptions() { DefaultPageXml = LoadPageXml("SamlLogout-Social-Site-Page") }); }
public virtual void RegisterPages(IUrlController controller) { RegisterPage(Add, controller); RegisterPage(Edit, controller); RegisterPage(Show, controller); RegisterPage(List, controller); }
public void RegisterUrls(IUrlController controller) { controller.AddPage(_pageName, _pageName, new SiteRootRouteConstraint(), null, _pageName, new PageDefinitionOptions { HasApplicationContext = false, SetCustomPageOutput = (context, outputController) => { }, ParseContext = context => { }, Validate = (context, accessController) => { if (PublicApi.Users.AccessingUser != null) { User anon = PublicApi.Users.Get(new UsersGetOptions { Username = PublicApi.Users.AnonymousUserName }); if (anon.Id != PublicApi.Users.AccessingUser.Id) { //If the user is a system administrator then grant access to the splash page so they can download the splash csv file, else redirect if (!PublicApi.RoleUsers.IsUserInRoles(PublicApi.Users.AccessingUser.Username, new [] { "Administrators" })) { accessController.Redirect(PublicApi.CoreUrls.Home(false)); } } } } }); }
public void RegisterUrls(IUrlController controller) { controller.AddRaw("bundling", "bundling/{*pathInfo}", null, null, null, new RawDefinitionOptions() { ForceLowercaseUrl = false }); }
public void RegisterUrls(IUrlController controller) { //var mapBookAction = new Action<HttpContextBase, PageContext>(MapBookAction); controller.AddPage("GroupMapBookList", "", new Telligent.Evolution.Urls.Routing.NotSiteRootRouteConstraint(), null, "coria-mapbook-list", MapBooks_PdOptions); controller.AddPage("GroupMapBookSingle", "{mapBook}", new Telligent.Evolution.Urls.Routing.NotSiteRootRouteConstraint(), null, "coria-mapbook-map-list", MapBook_PdOptions); controller.AddPage("GroupMap", "{mapBook}/map/{mapId}", new Telligent.Evolution.Urls.Routing.NotSiteRootRouteConstraint(), null, "coria-map-page", Map_PdOptions); }
void INavigable.RegisterUrls(IUrlController controller) { object userNameConstraint = new { UserName = @"^[a-zA-Z0-9\-\._]+$" }; controller.AddPage("poll_userpolls", "members/{UserName}/polls", null, userNameConstraint, "user-polllist", new PageDefinitionOptions() { ParseContext = ParseUserContext, DefaultPageXml = LoadPageXml("user-polllist-Social-Page") }); }
void IApplicationNavigable.RegisterUrls(IUrlController controller) { controller.AddRaw("forum-raw", "{ForumApp}/raw", null, null, (a, p) => { var handler = new CustomForumRawHttpHandler(); handler.ProcessRequest(a.ApplicationInstance.Context); }, new RawDefinitionOptions() { ParseContext = ParseForumContext }); }
public void RegisterUrls(IUrlController controller) { controller.AddRaw("office365_icon_handler", "icons/office365.png", null, null, (a, p) => { var handler = new OAuthIconHandler { CacheTimeOut = TimeSpan.FromMinutes(5) }; handler.ProcessRequest(a.ApplicationInstance.Context); }, new RawDefinitionOptions() { ParseContext = null }); }
protected void RegisterPage(RoutedPage page, IUrlController controller) { controller.AddPage(page.UrlName, page.UrlPattern, null, page.ParameterConstraints, page.PageName, new PageDefinitionOptions { ParseContext = page.ParseContext }); var pageName = page.UrlName.ToLowerInvariant(); if (!registeredPages.ContainsKey(pageName)) { lock (obj) { if (!registeredPages.ContainsKey(pageName)) { registeredPages.Add(pageName, page); } } } }
public void RegisterUrls(IUrlController controller) { controller.AddPage(_pageName, _pageName, new SiteRootRouteConstraint(), null, _pageName, new PageDefinitionOptions { HasApplicationContext = false, SetCustomPageOutput = (context, outputController) => { } , ParseContext = context => { }, Validate = (context, accessController) => { if (PublicApi.Users.AccessingUser != null) { User anon = PublicApi.Users.Get(new UsersGetOptions { Username = PublicApi.Users.AnonymousUserName }); if (anon.Id != PublicApi.Users.AccessingUser.Id) { //If the user is a system administrator then grant access to the splash page so they can download the splash csv file, else redirect if (!PublicApi.RoleUsers.IsUserInRoles(PublicApi.Users.AccessingUser.Username , new []{"Administrators"})) accessController.Redirect(PublicApi.CoreUrls.Home(false)); } } } }); }
public void RegisterUrls(IUrlController controller) { controller.AddPage("UserMapBookList", "members/{UserName}/mapbooks", new Telligent.Evolution.Urls.Routing.NotSiteRootRouteConstraint(), null, "coria-mapbooklist", MapBooks_PdOptions); controller.AddPage("UserMapBookSingle", "members/{UserName}/{mapBooks}/{mapBook}", new Telligent.Evolution.Urls.Routing.NotSiteRootRouteConstraint(), null, "coria-mapbook-map-list", MapBook_PdOptions); }
public void RegisterUrls(IUrlController controller) { LibrariesRouteTable.Get().RegisterPages(controller); DocumentsRouteTable.Get().RegisterPages(controller); }
public override void RegisterPages(IUrlController controller) { base.RegisterPages(controller); RegisterPage(Create, controller); }
public void RegisterUrls(IUrlController controller) { SplashLogic.RegisterUrls(controller); }
public void RegisterUrls(IUrlController controller) { controller.AddRaw("ipa-installation", "install-ipa/{*pathInfo}", null, null, (c, p) => { string path = c.Request.Url.LocalPath; path = path.Substring(path.IndexOf("__key/") + 6); if (path.EndsWith("/install.plist")) { path = path.Substring(0, path.Length - 14); } string fileStoreKey = path.Substring(0, path.IndexOf('/')); string fileName = path.Substring(path.LastIndexOf('/') + 1); if (path.Length - (fileStoreKey.Length + fileName.Length + 2) <= 0) { path = string.Empty; } else { path = path.Substring(fileStoreKey.Length + 1, path.Length - (fileStoreKey.Length + fileName.Length + 2)); } fileStoreKey = PublicApi.Url.DecodePathComponent(fileStoreKey); fileName = PublicApi.Url.DecodeFileComponent(fileName); path = PublicApi.Url.DecodePathComponent(path); if (!CentralizedFileStorage.CurrentUserHasAccess(fileStoreKey, path, fileName)) { c.Response.StatusCode = 404; return; } var fileStore = CentralizedFileStorage.GetFileStore(fileStoreKey); if (fileStore == null) { c.Response.StatusCode = 404; return; } var file = fileStore.GetFile(path, fileName); if (file == null) { c.Response.StatusCode = 404; return; } var appData = Telligent.Evolution.Mobile.ServiceLocator.Get <Telligent.Evolution.Mobile.App.Services.IAppDataService>().Get(file); if (appData == null) { c.Response.StatusCode = 404; return; } c.Response.ContentType = "application/xml"; c.Response.Write(string.Format(@"<?xml version=""1.0"" encoding=""UTF-8""?> <!DOCTYPE plist PUBLIC ""-//Apple//DTD PLIST 1.0//EN"" ""http://www.apple.com/DTDs/PropertyList-1.0.dtd""> <plist version=""1.0""> <dict> <!-- array of downloads. --> <key>items</key> <array> <dict> <!-- an array of assets to download --> <key>assets</key> <array> <!-- software-package: the ipa to install. --> <dict> <!-- required. the asset kind. --> <key>kind</key> <string>software-package</string> <!-- required. the URL of the file to download. --> <key>url</key> <string>{0}</string> </dict> </array> <key>metadata</key> <dict> <!-- required --> <key>bundle-identifier</key> <string>{2}</string> <!-- required. the download kind. --> <key>kind</key> <string>software</string> <!-- required. the title to display during the download. --> <key>title</key> <string>{1}</string> </dict> </dict> </array> </dict> </plist>", PublicApi.Html.Encode(PublicApi.Url.Absolute(file.GetDownloadUrl())), PublicApi.Html.Encode(appData.Name), PublicApi.Html.Encode(appData.ApplicationId))); }, new RawDefinitionOptions() { ForceLowercaseUrl = false, EnableRemoteProxying = true }); }
public void RegisterUrls(IUrlController controller) { ListsRouteTable.Get().RegisterPages(controller); ListItemsRouteTable.Get().RegisterPages(controller); }
void IApplicationNavigable.RegisterUrls(IUrlController controller) { controller.AddPage("forms.list", "", null, null, "forms-list", new PageDefinitionOptions { ParseContext = null, HasApplicationContext = false, TitleFunction = () => _translationController.GetLanguageResourceValue("page-forms-list"), DescriptionFunction = () => _translationController.GetLanguageResourceValue("page-forms-list-description"), DefaultPageXml = @"<contentFragmentPage pageName=""forms-list"" isCustom=""false"" layout=""Content"" themeType=""c6108064-af65-11dd-b074-de1a56d89593""> <regions> <region regionName=""Content""> <contentFragments> </contentFragments> </region> </regions> <contentFragmentTabs /> </contentFragmentPage>" }); controller.AddPage("forms.view", "{id}", null, null, "forms-view", new PageDefinitionOptions { ParseContext = null, HasApplicationContext = false, TitleFunction = () => _translationController.GetLanguageResourceValue("page-forms-list"), DescriptionFunction = () => _translationController.GetLanguageResourceValue("page-forms-list-description"), DefaultPageXml = @"<contentFragmentPage pageName=""forms-list"" isCustom=""false"" layout=""Content"" themeType=""c6108064-af65-11dd-b074-de1a56d89593""> <regions> <region regionName=""Content""> <contentFragments> </contentFragments> </region> </regions> <contentFragmentTabs /> </contentFragmentPage>" }); controller.AddPage("forms.new", "new", null, null, "forms-createedit", new PageDefinitionOptions { ParseContext = null, HasApplicationContext = false, TitleFunction = () => _translationController.GetLanguageResourceValue("page-forms-createedit"), DescriptionFunction = () => _translationController.GetLanguageResourceValue("page-forms-createedit-description"), DefaultPageXml = @"<contentFragmentPage pageName=""forms-createedit"" isCustom=""false"" layout=""Content"" themeType=""c6108064-af65-11dd-b074-de1a56d89593""> <regions> <region regionName=""Content""> <contentFragments> <contentFragment type=""Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.ScriptedContentFragments::8e73f2dfbfa84f77b4b438831314f091"" showHeader=""True"" cssClassAddition=""with-spacing responsive-1"" isLocked=""False"" configuration=""fragmentHeader=%24%7Bresource%3ACore_ApiKeyList_Name%7D"" /> </contentFragments> </region> </regions> <contentFragmentTabs /> </contentFragmentPage>" }); controller.AddPage("forms.edit", "{id}/edit", null, null, "forms-createedit", new PageDefinitionOptions { ParseContext = null, HasApplicationContext = false, TitleFunction = () => _translationController.GetLanguageResourceValue("page-forms-createedit"), DescriptionFunction = () => _translationController.GetLanguageResourceValue("page-forms-createedit-description"), DefaultPageXml = @"<contentFragmentPage pageName=""forms-createedit"" isCustom=""false"" layout=""Content"" themeType=""c6108064-af65-11dd-b074-de1a56d89593""> <regions> <region regionName=""Content""> <contentFragments> <contentFragment type=""Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.ScriptedContentFragments::8e73f2dfbfa84f77b4b438831314f091"" showHeader=""True"" cssClassAddition=""with-spacing responsive-1"" isLocked=""False"" configuration=""fragmentHeader=%24%7Bresource%3ACore_ApiKeyList_Name%7D"" /> </contentFragments> </region> </regions> <contentFragmentTabs /> </contentFragmentPage>" }); }