/// <summary>
    /// Reset token to initial state.
    /// </summary>
    protected void btnResetToken_Click(object sender, EventArgs e)
    {
        // Check "modify" permission
        if (!CurrentUser.IsAuthorizedPerResource("CMS.Users", "Modify"))
        {
            RedirectToAccessDenied("CMS.Users", "Modify");
        }

        MFAuthenticationHelper.ResetSecretForUser(ui);
        LoadData();
        ShowConfirmation(GetString("administration-user.token.reset"));
    }
Beispiel #2
0
    /// <summary>
    /// Reset token to initial state.
    /// </summary>
    protected void btnResetToken_Click(object sender, EventArgs e)
    {
        if (!CheckGlobalAdminEdit(ui))
        {
            plcTable.Visible = false;
            ShowError(GetString("Administration-User_List.ErrorGlobalAdmin"));

            return;
        }

        // Check "modify" permission
        if (!CurrentUser.IsAuthorizedPerResource("CMS.Users", "Modify"))
        {
            RedirectToAccessDenied("CMS.Users", "Modify");
        }

        MFAuthenticationHelper.ResetSecretForUser(ui);
        LoadData();
        ShowConfirmation(GetString("administration-user.token.reset"));
    }