-
Notifications
You must be signed in to change notification settings - Fork 289
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
🧪 Create Cypress test for Roles of variables #5614
base: main
Are you sure you want to change the base?
Changes from 5 commits
654c81b
7b38ef0
4ccdba7
3ef2087
5d12eac
2cbbe27
217f65d
617d711
371ae1f
9ad3217
cfe0fd3
2bbf795
985af40
904ea71
7c5c672
79c4362
46b7968
8bd27c7
9c7324f
3e31c63
87ce57d
ed32219
25bb87c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -160,6 +160,15 @@ def forget_current_user(): | |||||
session.pop("profile_image", None) # Delete profile image id if existing | ||||||
|
||||||
|
||||||
def show_roles_of_variables(): | ||||||
"""Whether the roles of variables should be shown in the variable view. | ||||||
(If not, only variable names and values will be shown in the list). | ||||||
Checks the configuration in the environment variable $SHOW_ROLES | ||||||
""" | ||||||
can_show_roles = os.getenv("SHOW_ROLES") | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh I just noticed this is in |
||||||
return can_show_roles | ||||||
|
||||||
|
||||||
def is_admin(user): | ||||||
"""Whether the given user (object) is an admin. | ||||||
|
||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to change this to "false" or "False" I'm seeing that they require the values of the env variables to be strings.