Skip to content

insights: editing dashboard grants with user restricted response

Created by: coury-clark

Currently the insights dashboard GraphQL returns some limited information about which grants are available to the dashboard

"""
Permissions object. Note: only organizations the user has access to will be included.
"""
type InsightsPermissionGrants {
    """
    Specific users that have permission.
    """
    users: [ID!]!
    """
    Organizations that have permission.
    """
    organizations: [ID!]!
    """
    True if the permission is set to global.
    """
    global: Boolean!
}

This information should be restricted based on the user context initiating the request, and filter org / user information down. However, this is incompatible with the definition for editing / creating dashboards, which requires a complete definition of grants available to the dashboard. Obviously, this is not possible to provide if a user doesn't have access to the complete list.

We need to provide a way to edit / create dashboards without mutating the overall visibility, but still allow users with non-global access (non-admins) to mutate and edit dashboards for things they can see.