Hide menu links based in Roles, Status or Logout/Login Users

Hi,

Is there any way to hide menu links based in Roles, Status or Logout/Login Users inside Tadabase?

Hello,

I have achieved this by adding multiple rows in a layout and then protecting each of those rows based on the user role. Then I add a menu to each of those rows and customize it base on what I want that user role to see, see photo:

Let me know if you have any questions.
Cam

3 Likes

Thank you! It works on the Page content but how about in the Default Layout. I think we can’t add new rows at the header or footer there

You can add rows on the default layout, you can add rows on any layout (See Screenshot) Once you add a row to the layout you can drag and drop it above or below the content making it a header or a footer. and than assign whatever role you want to see it.

Thank you! I overlooked that one. Actually it works when it comes to assigning permission but whenever I logged in, the row for the Non-logged in Menu still remain unless I reloaded the page.

Yes, this is a known bug that I also reported last week. They are working on a fix.

This is indeed a known bug and one we haven’t prioritized (yet). The reason it hasn’t become a top priority is due to the fact that this is generally only an error for the builder, not the end-user. Generally speaking, each user logs in as one role and doesn’t log in and out as different users/roles except while the app is being developed.

We will fix this in the near future, but this requires some significant updates to how the DOM is loaded and its interaction from the server-side. Rest assured, it will be resolved soon.

Hi Moe,

This does affect the end user if you are using multiple menus in a layout with different permissions (Displaying different menus based on user roles). Because each menu row is protected based on which role is logged in, when you log out the menu disappears and then when you log back in, the menu doesn’t reappear until you refresh the page. Any idea on setting this up differently, I’m all ears.

Every app I build I customize the menu for each user and this bug confuses users.

I added this Javascript to the layout to reload the page once on login, in seems to work with no issues.

(function() { if( window.localStorage ) { if( !localStorage.getItem('firstLoad') ) { localStorage['firstLoad'] = true; window.location.reload(); } else localStorage.removeItem('firstLoad'); } })();

3 Likes