Esempio n. 1
0
        public void TestCannotAccessUrls()
        {
            var community    = TestCommunity.LiveInAustralia.CreateTestCommunity(_communitiesCommand, _verticalsCommand, _contentEngine);
            var url          = _verticalsCommand.GetCommunityHostUrl(community, "");
            var verticalHost = url.Host;

            CreateExternalCookies(url, ExternalId, EmailAddress, FirstName + " " + LastName);
            Get(url);
            var homeUrl = LoggedInMemberHomeUrl.AsNonReadOnly();

            homeUrl.Host = verticalHost;
            AssertUrl(homeUrl);

            // Try to access some pages which should throw you back to the settings page.

            var settingsUrl = _settingsUrl.AsNonReadOnly();

            settingsUrl.Host = url.Host;

            var changePasswordUrl = _changePasswordUrl.AsNonReadOnly();

            changePasswordUrl.Host = url.Host;

            Get(changePasswordUrl);
            AssertUrl(settingsUrl);

            var deactivateUrl = _deactivateUrl.AsNonReadOnly();

            deactivateUrl.Host = url.Host;

            Get(deactivateUrl);
            AssertUrl(settingsUrl);
        }
Esempio n. 2
0
 protected ReadOnlyUrl GetCommunityHostUrl(Community community, bool secure, string path)
 {
     return(_verticalsCommand.GetCommunityHostUrl(community, secure, path));
 }