首页 > 学院 > 安全知识 > 正文

SharePoint2013 以其他用户登录和修改AD域用户密码的功能使用介绍

2024-07-16 17:01:39
字体:
来源:转载
供稿:网友

sharepoint默认是没有修改AD密码 和切换 用户的功能,这里我用future的方式来实现。

部署wsp前:

部署后:

点击以其他用户身份登录

点击修改用户密码:

这里的扩展才菜单我们用CustomAction来实现,我们需要添加空项目来部署它

以其他用户身份登录得xml如下:

修改用户密码的xml如下:

这里我们需要新建一个应用程序页面,首先需要添加路径映射:

添加应用程序页面的代码如下:


<%@ Assembly Name="$SharePoint.Project.AssemblyFullName___FCKpd___0quot; %><%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %><%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %><%@ Import Namespace="Microsoft.SharePoint" %><%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChangePassword.aspx.cs" Inherits="SharePointProjectDemo.Layouts.ChangePassword.ChangePassword" DynamicMasterPageFile="~masterurl/default.master" %><asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server"></asp:Content><asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">     <asp:Literal ID="ltMsg" EnableViewState="false" runat="server"></asp:Literal><div>    <h3>        <span>修改密码</span>    </h3>    <table width="400px">         <tr>            <td>               域            </td>            <td>                :            </td>            <td>                <asp:TextBox ID="txtdomain" runat="server" ></asp:TextBox>            </td>        </tr>         <tr>            <td>                旧密码            </td>            <td>                :            </td>            <td>                <asp:TextBox ID="txtOld" runat="server" TextMode="Password"></asp:TextBox>            </td>        </tr>        <tr>            <td>                新密码            </td>            <td>                :            </td>            <td>                <asp:TextBox ID="txtPass1" runat="server" TextMode="Password"></asp:TextBox>            </td>        </tr>        <tr>            <td>                确认新密码            </td>            <td>                :            </td>            <td>                <asp:TextBox ID="txtPass2" runat="server" TextMode="Password"></asp:TextBox>            </td>        </tr>        <tr>            <td colspan="3" align="center">                <br />                <asp:Button ID="btnChangePwd" runat="server" Text="修改密码" OnClick="btnChangePwd_Click" />            </td>        </tr>    </table>    <br />    <br /></div></asp:Content><asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">修改密码</asp:Content><asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" >修改密码</asp:Content>            
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表