CanManageProviders() public static method

Determines whether a user can manage providers.
public static CanManageProviders ( string username, string groups ) : bool
username string The username.
groups string The groups.
return bool
Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            AdminMaster.RedirectToLoginIfNeeded();

            currentWiki = DetectWiki();

            if (!AdminMaster.CanManageProviders(SessionFacade.GetCurrentUsername(), SessionFacade.GetCurrentGroupNames(currentWiki)))
            {
                UrlTools.Redirect("AccessDenied.aspx");
            }

            if (!Page.IsPostBack)
            {
                // Load themes and related data
                LoadThemes();
            }
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            AdminMaster.RedirectToLoginIfNeeded();

            if (!AdminMaster.CanManageProviders(SessionFacade.GetCurrentUsername(), SessionFacade.GetCurrentGroupNames()))
            {
                UrlTools.Redirect("AccessDenied.aspx");
            }

            if (!Page.IsPostBack)
            {
                lblResult.CssClass = "";
                lblResult.Text     = "";
                // Load providers and related data
                rptProviders.DataBind();
            }
        }