Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Jun 20, 2022
    • adam-james's avatar
      Audit Queries fall back to email when first/last names are nil (#23393) · 0a20cd02
      adam-james authored
      * Audit Queries fall back to email when first/last names are nil
      
      The audit page displays user information, and one column is "Name". Since we now allow nil first/last names, this
      value can return as a single space character. Instead, I've changed `common/user-full-name` to fall back to returning
      the user's email address if they have no first/last name values.
      
      Additionally:
      - since names can be nil, I've added sort by email to some of the queries for the audit page
      - display names have been changed from "Name" to "Member" in several queries to better fit the fallback to email
      
      * Add a test to check that audit pages have proper name fallback
      
      * Try to get test passing in CI
      
      * Make query work in MySQL by coalescing 'null' to empty string
      Unverified
      0a20cd02
  2. Jun 17, 2022
  3. Jun 15, 2022
  4. Jun 13, 2022
    • adam-james's avatar
      Allow 'null' First and Last names for Users (#23154) · 14312b9e
      adam-james authored
      
      * Migration to allow 'null' first and last names for users
      
      This is part of improving how we handle user names, related to SSO, but we also have an opportunity to make login via
      email simpler as well -> just loosen the requirement for names.
      
      * When only last name is given, :common_name should not have a space
      
      * WIP making optional first/last names safe in the backend.
      
      Trying to fix up some assumptions about first/last name keys in backend implementations.
      
      * Only add `:common_name` key when non-nil
      
      * Adjust setup tests to pass if use first/last name are nil
      
      * Fix up setup tests to work with null first/last names.
      
      * User API endpoints altered to handle nil names
      
      * Remove name validation test since they can be nil now
      
      * Alter JWT/SAML tests for nil user names
      
      * Remove "unknown" default in SAML
      
      * Add tests to make sure users are updating appropriately
      
      * use good naming convention in local function
      
      Co-authored-by: default avatarCam Saul <1455846+camsaul@users.noreply.github.com>
      
      * Simplify truthy check in test
      
      Co-authored-by: default avatarCam Saul <1455846+camsaul@users.noreply.github.com>
      
      * Simplify truthy check in test
      
      Co-authored-by: default avatarCam Saul <1455846+camsaul@users.noreply.github.com>
      
      * Indentation fix
      
      * Fix up syntax issue from github merge.
      
      * Fix missed function name changes in test
      
      * Clean up how sets are built up in the PUT user/:id endpoint
      
      * Better implementation for update-user-name
      
      * Avoid relying on 'vals' since order of keys is not guaranteed
      
      * Fixing little things, clarification in a comment
      
      * I'm tired... missed an obvious thing here. oops
      
      * indentation and clarify some testing
      
      * Change post-select implementation slightly
      
      * expected status is now an optional arg no dynamic var binding needed
      
      * 'f' is not optional, so we take it with first, then args are rest
      
      * simplify destructuring
      
      Co-authored-by: default avatarCam Saul <1455846+camsaul@users.noreply.github.com>
      Unverified
      14312b9e
    • Braden Shepherdson's avatar
      Define identity-hash for fairly robust de-duplication when deserializing (#23145) · d675a480
      Braden Shepherdson authored
      Define identity-hash for fairly robust de-duplication when deserializing
      
      This is a fallback for fully robust de-duplication based on `entity_id`
      fields.
      
      All serialized models should support identity-hash, and there is a test
      to enforce that.
      Unverified
      d675a480
    • Nick Fitzpatrick's avatar
      Question and Model Info Panel (#23197) · fc479abc
      Nick Fitzpatrick authored
      Unverified
      fc479abc
  5. Jun 07, 2022
  6. Jun 06, 2022
    • Case Nelson's avatar
      Handle deletable state when enabling persistence (#23118) · 4747155d
      Case Nelson authored
      * Handle deletable state when enabling persistence
      
      When enabling persistence all models are supposed to be set to creating
      unless they have been explicitly turned "off".
      
      Before, we were only looking for new models without attached
      PersistedInfos when enabling, but missed deletable PersistedInfos that
      needed to be re-enabled. It's the correct thing to do during the refresh
      as you wouldn't want refresh to re-enable but it's incorrect when
      enabling.
      
      * Remove unecessary thread-last
      Unverified
      4747155d
  7. Jun 03, 2022
    • Braden Shepherdson's avatar
      Add a test to check that all exported models have a portable unique name (#23081) · 21c6cb7f
      Braden Shepherdson authored
      Add a test to check that all exported models have a portable unique name
      
      Either an external name (eg. a database path) or an entity_id column.
      Unexported models are explicitly listed as such here.
      
      This makes it impossible to forget to address a unique ID for any new
      model.
      
      Related to epic #22641
      Unverified
      21c6cb7f
    • Ngoc Khuat's avatar
      Add `parameters` to report_card (#22976) · 0bd20d0b
      Ngoc Khuat authored
      
      * add parameters to report_card and card APIs
      
      * make sure migration can work with existing cards and add migration tests
      
      * remove debug code
      
      * When parameters is empty, return template tag parameters
      
      * update schema message
      
      * update migraiton test name
      
      * minor changes in test
      
      * fix failing tests
      
      * Always use card.parameters in PublicQuestion
      
      * Add defaults and readd isEmpty check
      
      * Default to undefined/use template tags in PublicQuestion...
      
      * parameters should be in the writableProperties
      
      * Native query card: construct parameters from template tags
      
      * Separate the generation of parameter id
      
      * Add parameter_mappings to report_card (#23003)
      
      * add parameter_mappings to report_card
      
      * fix from Noah's comments
      
      * fix from Noah's comments
      
      * Update a parameter from an updated template tag
      
      * Correct the parameters construction
      
      * Also add `parameter_mappings` to writableProperties
      
      * CI test: bust the npm module cache
      
      * Revert "CI test: bust the npm module cache"
      
      This reverts commit 5a327b616f0220f43a90f7f871e0bd877ffa6f47.
      
      Co-authored-by: default avatarDalton Johnson <daltojohnso@users.noreply.github.com>
      Co-authored-by: default avatarAriya Hidayat <ariya@metabase.com>
      Unverified
      0bd20d0b
  8. Jun 02, 2022
  9. Jun 01, 2022
  10. May 31, 2022
  11. May 30, 2022
  12. May 26, 2022
  13. May 25, 2022
  14. May 19, 2022
  15. May 17, 2022
    • adam-james's avatar
      Whitelabelling users font family font setting (#22791) · 856c46e2
      adam-james authored
      
      * Add font utilities to derive list of available fonts from font dirs
      
      This PR adds two defsettings to facilitate Enterprise users' ability to set the font for their instance. The
      'available-fonts' can be grabbed by the frontend to populate the dropdown menu. The 'application-font' setting can be
      written by the frontend to save the chosen font.
      
      * Adding some fonts and font selector
      
      * Send  (("dirname", "font name"),) to frontend
      
      Instead of only sending a list of names, send a tuple of `[directory-name, Display Name]`
      
      * Adding half of the fonts
      
      * Font list derived from font directory/font file names
      
      This is an attempt to derive the 'Display Name' of a font by comparing the directory name to the file names. '_' is
      replaced with spaces, but '-' exists in the 'Lato' font directory name, and we may have naming confusion in the
      future. Basically, I want to be liberal with what font directory/file names we can receive.
      
      Not certain this is the right approach yet, but it will work and correctly provides names based on the fonts available.
      
      * Adding remaining fonts
      
      * Using Default Font family in visual components
      
      * Small change to fix some lint warnings
      
      * Removing Noto Sans JP
      
      * Move logging
      
      * Alter hardcoded font path
      
      * Added cypress test
      
      * Change Cypress Test to look for correct text
      
      * Added unit tests for fonts.clj, and simplified creating display name
      
      The display name approach is simple -> underscores become spaces, and names are split on dashes/first word is taken
      from the split.
      
      This might not be robust to future font installations, but will be a good v1
      
      * adding visual test
      
      * fixing cypress test
      
      * Actually add the unit tests
      
      * Fix lint problems
      
      * Add setter to application-font to prevent invalid font setting
      
      * Addressing PR review points
      
      - fixed 'normalize-font-dirname' description
      - 'contains-font-file?' returns true/false
      - 'available-fonts-test' now properly uses 'is'
      
      * Make font-path private
      
      * Lint error.
      
      * Modified fonts to use java.io/resource to hopefully work in a jar
      
      * Simplified Lato folder name
      
      * PR Cleanup
      
      * Address some backend feedback
      
      * Lint error from reflection with .toString on a path
      
      I removed the explicit .toString inside the lamdba functino and str/includes still works.
      
      * no longer need u.files in test ns
      
      Co-authored-by: default avatarNick Fitzpatrick <nick@metabase.com>
      Unverified
      856c46e2
    • Howon Lee's avatar
  16. May 16, 2022
    • Case Nelson's avatar
      Persist auto enable (#22756) · c5a31c48
      Case Nelson authored
      
      * Auto enable persistence for models
      
      When persistence is turned on for a db, we want to enable persistence
      caching for all models in the db.
      
      We do this by finding any models without a PersistentInfo at the top of
      the scheduled refresh task and creating one that will get picked up by
      the refresh.
      
      This necessitated introducing another "off" state on PersistedInfo that
      will get set from the front end, manually disabling persistence on a
      model.  This turns PersistedInfo into a marker so that when the refresh
      task runs again, these models will not be turned back on.
      
      The prune job will prune "off" or "deletable" PersistedInfo. Since we don't
      have a second "off-ing" state; the prune job will "drop if exists" the
      cache table each time. This may need to change.
      
      * Cherry-pick persist-refresh changes from persist-refresh-fail-email
      
      * Ready models when enabling persistence on db
      
      * Handle automatic model persistence in Tools table
      
      * Address review: insert-many instead of  doseq insert
      
      Co-authored-by: default avatarAnton Kulyk <kuliks.anton@gmail.com>
      Unverified
      c5a31c48
    • adam-james's avatar
      Add font utilities to derive list of available fonts from font dirs (#22612) · f106ebfd
      adam-james authored
      
      * Add font utilities to derive list of available fonts from font dirs
      
      This PR adds two defsettings to facilitate Enterprise users' ability to set the font for their instance. The
      'available-fonts' can be grabbed by the frontend to populate the dropdown menu. The 'application-font' setting can be
      written by the frontend to save the chosen font.
      
      * Adding some fonts and font selector
      
      * Send  (("dirname", "font name"),) to frontend
      
      Instead of only sending a list of names, send a tuple of `[directory-name, Display Name]`
      
      * Adding half of the fonts
      
      * Font list derived from font directory/font file names
      
      This is an attempt to derive the 'Display Name' of a font by comparing the directory name to the file names. '_' is
      replaced with spaces, but '-' exists in the 'Lato' font directory name, and we may have naming confusion in the
      future. Basically, I want to be liberal with what font directory/file names we can receive.
      
      Not certain this is the right approach yet, but it will work and correctly provides names based on the fonts available.
      
      * Adding remaining fonts
      
      * Using Default Font family in visual components
      
      * Removing Noto Sans JP
      
      * Small change to fix some lint warnings
      
      * Move logging
      
      * Alter hardcoded font path
      
      * Added cypress test
      
      * Change Cypress Test to look for correct text
      
      * adding visual test
      
      * fixing cypress test
      
      * Added unit tests for fonts.clj, and simplified creating display name
      
      The display name approach is simple -> underscores become spaces, and names are split on dashes/first word is taken
      from the split.
      
      This might not be robust to future font installations, but will be a good v1
      
      * Actually add the unit tests
      
      * Fix lint problems
      
      * Add setter to application-font to prevent invalid font setting
      
      * Addressing PR review points
      
      - fixed 'normalize-font-dirname' description
      - 'contains-font-file?' returns true/false
      - 'available-fonts-test' now properly uses 'is'
      
      * Make font-path private
      
      * Lint error.
      
      * PR Cleanup
      
      Co-authored-by: default avatarNick Fitzpatrick <nick@metabase.com>
      Unverified
      f106ebfd
    • Noah Moss's avatar
  17. May 13, 2022
    • Case Nelson's avatar
      Update persist model api permissions for EE (#22601) · f302d582
      Case Nelson authored
      * Update persist model api permissions for EE
      
      On OSS, only Admins can enable model cache in `Settings/Cache`,
      enable database model cache in `Settings/Databases` and cache individual models.
      
      On EE/Pro, users with `Settings access` application permissions can enable model
      cache in `Settings/Cache` and users with `Manage database` can enable model
      cache for a database.
      
      * Add tests for application permissions
      Unverified
      f302d582
    • Howon Lee's avatar
      No open redirects for enterprise SSO's (#22622) · f3f9c627
      Howon Lee authored
      Open redirects means doing some sso with a built-in redirect, and redirecting into an unhappy place (aka, a non-MB place) afterwards so that someone gets phished or other bad things happen. This is already prevented for OSS sso's but not EE - prevents this for EE sso's by forcing redirects to be in MB `site-url` set domain.
      Unverified
      f3f9c627
  18. May 12, 2022
  19. May 11, 2022
  20. May 10, 2022
Loading