Liferay:如何防止登录页面(登录和注销)显示在菜单中? [英] Liferay: how to prevent landing pages (login and logout) from being shown in the menu?

查看:77
本文介绍了Liferay:如何防止登录页面(登录和注销)显示在菜单中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试寻找一种干净的方法,以便我的liferay门户的登录和注销页面不会显示在菜单中.对于登录页面,我想可以将用户移至私有页面部分,但是我不知道如何使注销登录页面不可见.而且,最好仅在您有效注销后才可以导航到注销页面,这样,当用户将URL缓存在浏览器中时,用户就不会意外进入该页面.

I'm trying to find a clean way so that the login and logout pages for my liferay portal aren't shown in my menu. For the login page I guess I could move the user to the private pages section but I have no clue how I can make the logout landing page not visible. And preferably the logout page would only be navigable to when you're effectively logged out so users can't accidentally go to it when they've got the url cached in their browser.

任何输入将不胜感激.

推荐答案

关于隐藏登录页面:只需创建登录页面,然后在该页面的管理页面"中选中隐藏"即可.这样可以根据权限访问该页面,但将其隐藏在导航中-例如如果您知道页面的名称,则可以按照您的要求去那里.

Regarding hiding the landing pages: Just create them and check "hidden" in "Manage Page" for that page. This will make the page accessible according to the permissions, but hide it in the navigation - e.g. if you know the page's name, you can go there - just as you requested.

如果在注销登录页面上显示当前登录的用户(例如,通过登录" Portlet),则无需显示您已注销"之类的消息,而是显示当前状态用户会话的时间.

If you display the currently logged in user on the logout landing page (e.g. through the "Sign In" portlet, you don't need to display a message like "you've been logged out", but display the current state of the user's session.

当然,您可以随意使用该页面上的登录"机会,在这种情况下,您必须在其他Portlet中显示当前会话状态.它可以像模板化的WebContent portlet一样简单,可以访问当前登录的用户.

Of course you're free to not use the Sign-In opportunity on that page, in this case you'll have to display the current session state in a different portlet. It could be as simple as a templated WebContent portlet, accessing the currently logged in user.

编辑:如果您设置了default.logout.page.path =/web/guest/logout和auth.forward.by.last.path = true,但在退出时仍无法重定向,则可能是通过UI进行的更改会覆盖您的portal-ext.properties.如果您在ControlPanel中编辑了设置",则很可能是这种情况.您可以在设置的第一页上设置这些值.

Edit: If you set default.logout.page.path=/web/guest/logout and auth.forward.by.last.path=true but you're still not redirected on logout, chances are that changes made through the UI override your portal-ext.properties. If you've edited "Settings" in ControlPanel, this is most likely the case. You can set these values there, on the first page in settings.

如您的注释中所述:您不能隐藏第一页.这应该不成问题:只需隐藏其他任何页面即可.即使您没有比此更多的公共内容,也可以至少有一个公共页面指出您需要登录.首先,使注销页面可以是该页面的子页面,也可以是新的顶级页面-但最重要的是:它可以隐藏.

As noted in your comment: You cannot make the first page hidden. This shouldn't be a problem: Just make any other page hidden. Even if you don't have more public content than this, you can have at least a public page stating that you need to login. Make this the first, so the logout page can be either a child page of this or a new toplevel page - but most importantly: It can be hidden.

这篇关于Liferay:如何防止登录页面(登录和注销)显示在菜单中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆