-
Notifications
You must be signed in to change notification settings - Fork 2
Add query role privilege #256
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
base: dev
Are you sure you want to change the base?
Conversation
# Conflicts: # DESCRIPTION # NEWS.md # inst/golem-config.yml
jthompson-arcus
left a comment
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.
As I understand it, this role is meant to restrict query creation and resolution. But any user can still respond to queries correct?
| if (file.exists("clinsight-config.yml")) { | ||
| "clinsight-config.yml" |
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.
This change should be documented in the Deployment vignette.
| observeEvent(r$user_role, { | ||
| shinyjs::toggleElement( | ||
| "resolved", | ||
| condition = get_roles_from_config()[r$user_role] %in% get_golem_config("allow_to_query") | ||
| ) | ||
| }) |
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.
This only causes the checkbox to not be displayed. A user could in their browser make the checkbox visible and still "resolve" a query even without the permissions.
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.
Actually realizing there's not a ton a server side verification being done here. I'm also able to comment on "resolved" queries as well just by removing the disabled attribute in the browser.
Closes #17.
allow_to_query()role cannot close queries.clinsight-config.ymland using that before falling back to the defaultgolem-config.ymlfile in the package