Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add_view menu_cond #1922

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

steve-embling
Copy link
Contributor

Description

menu_cond parameter of appbuilder.add_view is described as being a callable or None, that will hide the menu item if returns false. But setting this as per docs doesn't hide the menu item.

Apologies for lack of test case. It looks like current ones fail if an item is artificially hidden, but doesn't fail if an item is not hidden.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Is CRUD MVC related.
  • Is Auth, RBAC security related.
  • Changes the security db schema.
  • Introduces new feature
  • Removes existing feature

@steve-embling
Copy link
Contributor Author

Closing this - It doesnt only hide from the main menu but from action menus too, so I don't think that was the intention. Will step back and take a look for a more sensible approach, probably in menu

@steve-embling
Copy link
Contributor Author

Rereading the docs and actually struggling to interpret exactly what is intended, so maybe this does meet it.

It's not what I was looking for (keeping the views but leaving them out of the main menu) but appears to meet conditions described in docs, kind of! Sorry.

I do not think this should be merged but I'll reopen for discussion perhaps.

@steve-embling steve-embling reopened this Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant