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

ui: app switcher component #309

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

ui: app switcher component #309

wants to merge 2 commits into from

Conversation

uhrjun
Copy link
Member

@uhrjun uhrjun commented Aug 23, 2024

App switcher component from frappe/crm#301

roles_to_check = {"Gameplan Admin", "Gameplan Member", "Gameplan Guest", "System Manager"}
user_roles = frappe.get_roles(user)

return not roles_to_check.isdisjoint(user_roles)
Copy link
Member

@surajshetty3416 surajshetty3416 Aug 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return not roles_to_check.isdisjoint(user_roles)
return bool(roles_to_check.intersection(user_roles))

more readable?


Also we use "tab" to indent

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.

2 participants