VerifyReadPermissionsForCurrentNamespace() public static method

Verifies read permissions for the current user, redirecting to the appropriate page if no valid permissions are found.
public static VerifyReadPermissionsForCurrentNamespace ( ) : void
return void
Example #1
0
		protected void Page_Load(object sender, EventArgs e) {
			Page.Title = Properties.Messages.NavPathTitle + " - " + Settings.WikiTitle;

			LoginTools.VerifyReadPermissionsForCurrentNamespace();

			PrintNavPaths();
		}
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.Title = Properties.Messages.CategoryTitle + " - " + Settings.WikiTitle;

            LoginTools.VerifyReadPermissionsForCurrentNamespace();

            currentNamespace = DetectNamespaceInfo();

            PrintCat();
        }
Example #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string currentWiki = DetectWiki();

            PageSize = Settings.GetListSize(currentWiki);
            rangeEnd = PageSize - 1;

            LoginTools.VerifyReadPermissionsForCurrentNamespace(currentWiki);

            if (Request["Cat"] != null)
            {
                if (Request["Cat"].Equals("-"))
                {
                    lblPages.Text = Properties.Messages.UncategorizedPages;
                }
                else
                {
                    lblPages.Text = Properties.Messages.PagesOfCategory + " <i>" + Request["Cat"] + "</i>";
                }
            }

            if (!Page.IsPostBack)
            {
                lnkCategories.NavigateUrl = UrlTools.BuildUrl(currentWiki, "Category.aspx");
                lnkSearch.NavigateUrl     = UrlTools.BuildUrl(currentWiki, "Search.aspx");

                currentPages           = GetAllPages();
                pageSelector.ItemCount = currentPages.Count;
                pageSelector.PageSize  = PageSize;

                string p = Request["Page"];
                if (!int.TryParse(p, out selectedPage))
                {
                    selectedPage = 0;
                }
                pageSelector.SelectPage(selectedPage);
            }

            Page.Title = Properties.Messages.AllPagesTitle + " (" + (rangeBegin + 1).ToString() + "-" + (rangeEnd + 1).ToString() + ") - " + Settings.GetWikiTitle(currentWiki);

            // Important note
            // This page cannot use a repeater because the page list has particular elements used for grouping pages

            PrintPages();
        }