Skip to content

Conversation

@LDSamson
Copy link
Collaborator

@LDSamson LDSamson commented Dec 15, 2025

Closes #17.

  • Adds more role privileges (e.g. who can save a query).
    • Hides query button if the role does not allow to query
    • Everyone with a role assigned can write follow-up messages to a query. However, people without the allow_to_query() role cannot close queries.
  • Polished some of the messages regarding role-specific privileges.
    • For example, if no role is assigned, the message is less dramatic and does not sound like there is a major error anymore -> this is not needed. In ShinyProxy setups, it can occur that people do not have a role assigned but has access to the app; then the person simply has viewing acces.
  • Makes it easier to add a clinsight custom configuration by searching in the working directory for clinsight-config.yml and using that before falling back to the default golem-config.yml file in the package

@LDSamson LDSamson marked this pull request as ready for review December 16, 2025 15:33
@LDSamson LDSamson linked an issue Dec 16, 2025 that may be closed by this pull request
# Conflicts:
#	DESCRIPTION
#	NEWS.md
#	inst/golem-config.yml
Copy link
Collaborator

@jthompson-arcus jthompson-arcus left a 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?

Comment on lines +797 to +798
if (file.exists("clinsight-config.yml")) {
"clinsight-config.yml"
Copy link
Collaborator

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.

Comment on lines +70 to +75
observeEvent(r$user_role, {
shinyjs::toggleElement(
"resolved",
condition = get_roles_from_config()[r$user_role] %in% get_golem_config("allow_to_query")
)
})
Copy link
Collaborator

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.

Copy link
Collaborator

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.

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.

Queries: implement role-based authority for closing queries.

3 participants