我希望隐藏顶级菜单导航栏,当用户角色为" ERP USER"时,应该保留注销链接。或如何删除导航项目"我的个人资料","我的帐户" &安培; "我的仪表板"。由于第三方应用程序中的某些安全访问,我需要禁用此导航项。
有人能解释我如何完成我的要求吗?
感谢!!!
答案 0 :(得分:2)
您可以通过修改门户网站配置来删除我的个人资料,我的仪表板和控制面板条目,其余的需要进行一些开发。如果您将 portal-ext.properties 中的followig选项设置为 false ,前两个将消失:
#
# Set whether or not private layouts are enabled. Set whether or not private
# layouts should be auto created if a user has no private layouts. If
# private layouts are not enabled, then the property
# "layout.user.private.layouts.auto.create" is assumed to be false.
#
layout.user.private.layouts.enabled=true
layout.user.private.layouts.auto.create=true
#
# Set whether or not public layouts are enabled. Set whether or not public
# layouts should be auto created if a user has no public layouts. If public
# layouts are not enabled, then the property
# "layout.user.public.layouts.auto.create" is assumed to be false.
#
layout.user.public.layouts.enabled=true
layout.user.public.layouts.auto.create=true
您将禁用用户的私人和公共页面(并从停靠栏中删除它们)。
要摆脱控制面板,您必须撤消角色配置中的访问控制面板权限(通常用于用户角色)。< / p>
您的其他两个要求 - 隐藏我的个人资料或删除 Dockbar 将需要更多努力。
要摆脱我的个人资料,你需要为Dockbar portlet创建JSP钩子(版本6.2中应该是https://github.com/liferay/liferay-portal/blob/master/portal-web/docroot/html/portlet/dockbar/view_user_account.jspf)。
隐藏停靠栏以获取特定角色的最简单方法是在主题的 portal_normal.vm / ftl 中实施角色检查。在标准无样式_ 主题中,您必须更改以下行https://github.com/liferay/liferay-portal/blob/6.2.0-ga1/portal-web/docroot/html/themes/_unstyled/templates/portal_normal.ftl#L21-L23
答案 1 :(得分:0)
您可以为特定用户使用 portal_normal.vm 中的Liferay主题删除导航栏。将此主题应用于您当前的网站。