【问题标题】:How to show customaction menu item depending upon user permission如何根据用户权限显示自定义操作菜单项
【发布时间】:2009-09-03 11:22:05
【问题描述】:

我有一个 CustomAction 菜单项

    <CustomAction Id="DocumentManagement.DocLibNewToolbar" Location="EditControlBlock" RegistrationType="ContentType" RegistrationId="0x0101002bae451fbd3640fb9bae5df410b4a9a0" Title="Print">
        <UrlAction Url="~site/_layouts/ELSActionMenu/PrintListItem.aspx?List={ListId}&amp;ID={ItemId}"/>
  </CustomAction>

我知道我可以编写一个 SPItemEventReceiver 类并检查当前用户角色是否符合条件。 但是我想在 ListItem["Authorized"] =TRUE 上隐藏这个 CustomAction,这可能吗?

【问题讨论】:

    标签: sharepoint sharepoint-2007


    【解决方案1】:

    根据我理解的问题的标题,您需要根据权限显示自定义操作。有几种方法可以做到这一点,自定义操作标记有一个名为 Rights 的属性,它可以占用 SharePoint 拥有的 33 种内置权限中的任何一种。有关详细信息,请参阅this article。否则,您可以创建一个自定义类,该类将根据自定义逻辑决定何时显示菜单项,请参阅this 文章。

    【讨论】:

    • 谢谢,但是否可以显示/隐藏 ListItem 上元数据的 CustomAction 依赖项?
    猜你喜欢
    • 1970-01-01
    • 2019-09-05
    • 1970-01-01
    • 2018-11-08
    • 1970-01-01
    • 1970-01-01
    • 2017-06-17
    • 1970-01-01
    • 2011-01-26
    相关资源
    最近更新 更多