<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Remove items from personal bar menu in 7.2</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114828738" />
  <subtitle>Remove items from personal bar menu in 7.2</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114828738</id>
  <updated>2026-05-10T15:49:14Z</updated>
  <dc:date>2026-05-10T15:49:14Z</dc:date>
  <entry>
    <title>RE: Remove items from personal bar menu in 7.2</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121307094" />
    <author>
      <name>Fernando Paz</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121307094</id>
    <updated>2021-12-23T18:04:38Z</updated>
    <published>2021-12-23T18:04:38Z</published>
    <summary type="html">&lt;p&gt;IMO, the is a rol name &amp;quot;User&amp;quot; that is asigned to all
  authenticated users.  There you can follow the instruction by @Vivek
  Metha enable or disabled the &amp;quot;Access in Personal Menu&amp;quot; Permission.&lt;/p&gt;
&lt;p&gt;
  &lt;img alt=""
    src="/documents/14/0/lr1.png/20658343-0e11-64fc-47a3-deb0315f2ed6?t=1640282654983&amp;amp;imagePreview=1" /&gt; &lt;img
    alt="" src="/documents/14/0/lr2.png/4bd38f25-7abb-c937-2c96-b729edd56270?t=1640282671605&amp;amp;imagePreview=1" /&gt;
  &lt;br /&gt;
  &lt;br /&gt;  &lt;/p&gt;</summary>
    <dc:creator>Fernando Paz</dc:creator>
    <dc:date>2021-12-23T18:04:38Z</dc:date>
  </entry>
  <entry>
    <title>RE: Remove items from personal bar menu in 7.2</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117258664" />
    <author>
      <name>Dmitry Oshkalo</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117258664</id>
    <updated>2019-09-23T09:27:41Z</updated>
    <published>2019-09-23T09:27:41Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;I can't say this is the best way of solving the problem (since I'm not so confident with OSGi), but at least it works.&lt;br&gt;As far as I understand, since every personal menu entry is a separate component implementing PersonalMenuEntry interface, which determines isShow(...) as a default method and just returns "true", and none of the components overrides this method, it's useless to override PersonalMenuEntry using service ranking (you'll just get duplicated entries). The proposed solution is to replace an original component with a custom one. By replacing I mean deactivating the original component when the custom one is activated and vice versa.&lt;br&gt;This post should be helpful:&amp;nbsp;&lt;a href="https://liferay.dev/blogs/-/blogs/extending-osgi-components"&gt;https://liferay.dev/blogs/-/blogs/extending-osgi-components&lt;/a&gt;&lt;br&gt;The custom component for MyWorkflowTaskPersonalMenuEntry looks like this:&lt;br&gt;&lt;pre&gt;&lt;code&gt;@Component(immediate = true, 
property = { 
		"product.navigation.personal.menu.entry.order:Integer=500",
		"product.navigation.personal.menu.group:Integer=200"
	}, service = PersonalMenuEntry.class)
public class CustomMyWorkflowsTaskPersonalMenuEntry extends BasePersonalMenuEntry {

	private final static String COMPONENT_NAME = "com.liferay.portal.workflow.task.web.internal.product.navigation.personal.menu.MyWorkflowTaskPersonalMenuEntry";

	private BundleContext _bundleContext;
	
	private ComponentDescriptionDTO _desc;

	@Reference
	private ServiceComponentRuntime _serviceComponentRuntime;

	@Activate
	public void activate(BundleContext bundleContext) throws InvalidSyntaxException {
		_bundleContext = bundleContext;
		_deactivateOriginalComponent();
	}
	
	@Deactivate
	public void deactivate() throws InvalidSyntaxException {
		_activateOriginalComponent();
		_bundleContext = null;
	}

	private void _deactivateOriginalComponent() throws InvalidSyntaxException {
		if (_bundleContext == null) {
			return;
		}
		
		Collection&amp;lt;servicereference&amp;lt;personalmenuentry&amp;gt;&amp;amp;gt; componentMenuEntries = _bundleContext
				.getServiceReferences(PersonalMenuEntry.class, "(component.name=" + COMPONENT_NAME + ")");
		
		for(ServiceReference&amp;lt;personalmenuentry&amp;gt; ref : componentMenuEntries) {
			Bundle bundle = ref.getBundle();
			_desc = _serviceComponentRuntime.getComponentDescriptionDTO(bundle, COMPONENT_NAME);
			_serviceComponentRuntime.disableComponent(_desc);
		}
	}
	
	private void _activateOriginalComponent() throws InvalidSyntaxException {
		if (_desc != null) {
			_serviceComponentRuntime.enableComponent(_desc);
		}
	}
	

	@Override
	protected String getPortletId() {
		return PortletKeys.MY_WORKFLOW_TASK;
	}

	@Override
	public boolean isShow(PortletRequest portletRequest, PermissionChecker permissionChecker) throws PortalException {
		// your logic here...
	}
}
&amp;lt;/personalmenuentry&amp;gt;&amp;lt;/servicereference&amp;lt;personalmenuentry&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;You also may override getLabel() and other methods as you like. After you deploy this component, the original MyWorkflowTaskPersonalMenuEntry will be replaced, if your version of isShow() returns true, or none will be displayed otherwise. After you remove the custom component, the original one should be displayed as usual.&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Dmitry Oshkalo</dc:creator>
    <dc:date>2019-09-23T09:27:41Z</dc:date>
  </entry>
  <entry>
    <title>RE: Remove items from personal bar menu in 7.2</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117233976" />
    <author>
      <name>Erik Lillegraven</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117233976</id>
    <updated>2019-09-20T15:24:41Z</updated>
    <published>2019-09-20T15:24:41Z</published>
    <summary type="html">Thanks, blacklisting works fine.But it would also be  nice if one could override some of the PersonalMenuEntry classes and set the logic in the isShow() method with our own code.</summary>
    <dc:creator>Erik Lillegraven</dc:creator>
    <dc:date>2019-09-20T15:24:41Z</dc:date>
  </entry>
  <entry>
    <title>RE: Remove items from personal bar menu in 7.2</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=115464856" />
    <author>
      <name>Dmitry Oshkalo</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=115464856</id>
    <updated>2019-09-14T19:23:55Z</updated>
    <published>2019-09-14T19:23:55Z</published>
    <summary type="html">If you want to just get rid of  some menu items in the personal bar, it will be much easier to use component blacklist:&lt;br /&gt;&lt;a href="https://portal.liferay.dev/docs/7-1/user/-/knowledge_base/u/blacklisting-osgi-modules-and-components"&gt;https://portal.liferay.dev/docs/7-1/user/-/knowledge_base/u/blacklisting-osgi-modules-and-components&lt;/a&gt;&lt;br /&gt;For instance, to remove &amp;#34;My Workflow Tasks&amp;#34; open Conrol Panel, then navigate to Configuration -&amp;gt; System settings, then click on Module Container icon in Platform category. Then select Component blacklist from the list and specify &lt;br /&gt;com.liferay.portal.workflow.task.web.internal.product.navigation.personal.menu.MyWorkflowTaskPersonalMenuEntry &lt;br /&gt; as a component&amp;#39;s name. After you click on Update button, the item will go away from the personal bar.You may find out the names of the components corresponding to each default menu item by using the gogo console like this.&lt;br /&gt;scr:list | grep PersonalMenuEntry &lt;br /&gt;Of course, if you want to implement some additional functionality over the menu items, you should follow Jan&amp;#39;s advice and override MVCResourceCommand.</summary>
    <dc:creator>Dmitry Oshkalo</dc:creator>
    <dc:date>2019-09-14T19:23:55Z</dc:date>
  </entry>
  <entry>
    <title>RE: Remove items from personal bar menu in 7.2</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=115083486" />
    <author>
      <name>Jan Tošovský</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=115083486</id>
    <updated>2019-09-04T10:36:04Z</updated>
    <published>2019-09-04T10:36:04Z</published>
    <summary type="html">All items to display are collected in this class:&lt;br /&gt;&lt;a href="https://github.com/liferay/liferay-portal/blob/7.2.0-ga1/modules/apps/product-navigation/product-navigation-personal-menu-web/src/main/java/com/liferay/product/navigation/personal/menu/web/internal/PersonalMenuEntryRegistry.java"&gt;https://github.com/liferay/liferay-portal/blob/7.2.0-ga1/modules/apps/product-navigation/product-navigation-personal-menu-web/src/main/java/com/liferay/product/navigation/personal/menu/web/internal/PersonalMenuEntryRegistry.java&lt;/a&gt;&lt;br /&gt;They are then converted into JSON and served via MVCResourceCommand:&lt;br /&gt;&lt;a href="https://github.com/liferay/liferay-portal/blob/7.2.0-ga1/modules/apps/product-navigation/product-navigation-personal-menu-web/src/main/java/com/liferay/product/navigation/personal/menu/web/internal/portlet/action/GetPersonalMenuItemsMVCResourceCommand.java"&gt;https://github.com/liferay/liferay-portal/blob/7.2.0-ga1/modules/apps/product-navigation/product-navigation-personal-menu-web/src/main/java/com/liferay/product/navigation/personal/menu/web/internal/portlet/action/GetPersonalMenuItemsMVCResourceCommand.java&lt;/a&gt;&lt;br /&gt;You can override that MVCResourceCommand with your clone, which somehow filters out these entries. &lt;br /&gt;In this particular case you could somehow override PersonalMenuEntry component and set isShow() method to false:&lt;br /&gt;&lt;a href="https://github.com/liferay/liferay-portal/blob/7.2.0-ga1/modules/apps/portal-workflow/portal-workflow-task-web/src/main/java/com/liferay/portal/workflow/task/web/internal/product/navigation/personal/menu/MyWorkflowTaskPersonalMenuEntry.java"&gt;https://github.com/liferay/liferay-portal/blob/7.2.0-ga1/modules/apps/portal-workflow/portal-workflow-task-web/src/main/java/com/liferay/portal/workflow/task/web/internal/product/navigation/personal/menu/MyWorkflowTaskPersonalMenuEntry.java&lt;/a&gt;&lt;br /&gt;But I am unable to do this properly so far.</summary>
    <dc:creator>Jan Tošovský</dc:creator>
    <dc:date>2019-09-04T10:36:04Z</dc:date>
  </entry>
  <entry>
    <title>RE: Remove items from personal bar menu in 7.2</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114851653" />
    <author>
      <name>Vivek Mehta</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114851653</id>
    <updated>2019-08-23T21:48:17Z</updated>
    <published>2019-08-23T21:48:17Z</published>
    <summary type="html">You will need to do some hit and trials here. But be sure to make changes only in the hook so that the original jsp file doesnt gets affected.</summary>
    <dc:creator>Vivek Mehta</dc:creator>
    <dc:date>2019-08-23T21:48:17Z</dc:date>
  </entry>
  <entry>
    <title>RE: Remove items from personal bar menu in 7.2</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114851119" />
    <author>
      <name>Erik Lillegraven</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114851119</id>
    <updated>2019-08-23T14:21:41Z</updated>
    <published>2019-08-23T14:21:41Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;The jsp file uses a tag to render the Personal Menu:&lt;br&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;liferay-product-navigation:personal-menu &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;expanded="&amp;lt;%= true %&amp;gt;" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;label="&amp;lt;%= userAvatar %&amp;gt;" /&amp;gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;This tag gets all classes implementing "PersonalMenuEntry", so it's easy to add a menu-entry by creating such a class, but not to remove one.&lt;br&gt;&lt;br&gt;The logic lies within&amp;nbsp;these Liferay classes which have a method to decide if to show its menu entry or not. But I don't know how&amp;nbsp;to override these classes. They are not like service classes which&amp;nbsp;you can extend and give a higher "service.ranking".&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Erik Lillegraven</dc:creator>
    <dc:date>2019-08-23T14:21:41Z</dc:date>
  </entry>
  <entry>
    <title>RE: Remove items from personal bar menu in 7.2</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114850703" />
    <author>
      <name>Vivek Mehta</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114850703</id>
    <updated>2019-08-23T12:19:13Z</updated>
    <published>2019-08-23T12:19:13Z</published>
    <summary type="html">Rather try searching for the jsp files inside the   &amp;#34; liferay-portal-&amp;gt; tomcat -&amp;gt; webapps -&amp;gt; ROOT -&amp;gt; html &amp;#34; which contains this portlet or menu( It is gonna take some effort in searching ). Then you can create the hook and make changes in that jsp file by importing the custom jsp files from liferay hook configurations. Then from there simply delete the portionof code which is responsible for showing that menu ( My submissions, My workflow taks, etc.).  I have done this few times. It will work for you too.</summary>
    <dc:creator>Vivek Mehta</dc:creator>
    <dc:date>2019-08-23T12:19:13Z</dc:date>
  </entry>
  <entry>
    <title>RE: Remove items from personal bar menu in 7.2</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114844953" />
    <author>
      <name>Erik Lillegraven</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114844953</id>
    <updated>2019-08-23T09:58:23Z</updated>
    <published>2019-08-23T09:58:23Z</published>
    <summary type="html">Thanks for your reply.&lt;br /&gt;I&amp;#39;m afraid there is no id or class attributes in the html that can be used to pick specific menu (list) elements to be hidden, so this approach seems not to be an option. </summary>
    <dc:creator>Erik Lillegraven</dc:creator>
    <dc:date>2019-08-23T09:58:23Z</dc:date>
  </entry>
  <entry>
    <title>RE: Remove items from personal bar menu in 7.2</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114844603" />
    <author>
      <name>Erik Lillegraven</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114844603</id>
    <updated>2019-08-23T09:50:20Z</updated>
    <published>2019-08-23T09:50:20Z</published>
    <summary type="html">The &amp;#34;My Account&amp;#34; is removed in v7.2, so that is not possible. Can&amp;#39;t find any other permission neither which has any impact on this.</summary>
    <dc:creator>Erik Lillegraven</dc:creator>
    <dc:date>2019-08-23T09:50:20Z</dc:date>
  </entry>
  <entry>
    <title>RE: Remove items from personal bar menu in 7.2</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114842269" />
    <author>
      <name>Juan Miguel Imaz</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114842269</id>
    <updated>2019-08-22T13:51:25Z</updated>
    <published>2019-08-22T13:51:25Z</published>
    <summary type="html">For the administrator you can play with a litte of css to &amp;#34;remove&amp;#34; the undesidered elements.</summary>
    <dc:creator>Juan Miguel Imaz</dc:creator>
    <dc:date>2019-08-22T13:51:25Z</dc:date>
  </entry>
  <entry>
    <title>RE: Remove items from personal bar menu in 7.2</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114840647" />
    <author>
      <name>Vivek Mehta</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114840647</id>
    <updated>2019-08-22T07:11:51Z</updated>
    <published>2019-08-22T07:11:51Z</published>
    <summary type="html">Hi Erik,&lt;br /&gt;I doubt that you can acheive this for the administrator. But for any normal user you can acheive this by simply defining  permissions in the roles section. Just follow these steps :-&lt;br /&gt;i )    Go to Control Panel.&lt;br /&gt;ii )  Open Roles.&lt;br /&gt;iii)  Select the desired Role ( i.e, if the user for whom you want to hide  the &amp;#34;My Submissions&amp;#34; and &amp;#34;My Workflow Tasks&amp;#34; options has the role &amp;#34;Client Member&amp;#34; then select &amp;#34;Client Member&amp;#34;) .&lt;br /&gt;iv ) Now go to the &amp;#34;define permissions&amp;#34; menu.&lt;br /&gt;v)   There you will see &amp;#34;My Account&amp;#34; Option . Open it.&lt;br /&gt;vi) Now enable or disable the access from there as your requirement.</summary>
    <dc:creator>Vivek Mehta</dc:creator>
    <dc:date>2019-08-22T07:11:51Z</dc:date>
  </entry>
  <entry>
    <title>Remove items from personal bar menu in 7.2</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114828737" />
    <author>
      <name>Erik Lillegraven</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114828737</id>
    <updated>2019-08-21T10:04:38Z</updated>
    <published>2019-08-21T10:04:38Z</published>
    <summary type="html">Hi,&lt;br /&gt;&lt;br /&gt;Does anyone know how to remove a menu item in the personal bar in 7.2 ?&lt;br /&gt;&lt;br /&gt;For example remove &amp;#34;My Submissions&amp;#34; and &amp;#34;My Workflow Tasks&amp;#34;. Is it possible?&lt;br /&gt;&lt;br /&gt;Ref. &lt;a href="https://github.com/liferay/liferay-portal/blob/master/readme/BREAKING_CHANGES.markdown#move"&gt;https://github.com/liferay/liferay-portal/blob/master/readme/BREAKING_CHANGES.markdown#move&lt;/a&gt;-the-user-menu-out-of-the-product-menu&lt;br /&gt;&lt;br /&gt;Thanks</summary>
    <dc:creator>Erik Lillegraven</dc:creator>
    <dc:date>2019-08-21T10:04:38Z</dc:date>
  </entry>
</feed>
