This project is mirrored from https://github.com/metabase/metabase.
Pull mirroring updated .
- Jun 15, 2022
-
-
adam-james authored
* JWT shared key can now be any string. Message to suggest 64char key * Remove util require * We can now pass nice, readable multiline strings to tru/trs macros So let's do that here :)
-
- Jun 13, 2022
-
-
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:
Cam Saul <1455846+camsaul@users.noreply.github.com> * Simplify truthy check in test Co-authored-by:
Cam Saul <1455846+camsaul@users.noreply.github.com> * Simplify truthy check in test Co-authored-by:
Cam 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:
Cam Saul <1455846+camsaul@users.noreply.github.com>
-
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.
-
Nick Fitzpatrick authored
-
- Jun 07, 2022
-
-
Alexander Polyankin authored
-
Alexander Polyankin authored
-
Alexander Polyankin authored
-
- Jun 06, 2022
-
-
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
-
- Jun 03, 2022
-
-
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
-
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:
Dalton Johnson <daltojohnso@users.noreply.github.com> Co-authored-by:
Ariya Hidayat <ariya@metabase.com>
-
- Jun 02, 2022
-
-
adam-james authored
* Adjust JWT and SAML fetch-and-update user to save new attributes Before this change, JWT/SAML logins would attempt to update attributes, but never considered the first-name or last-name attributes. * Attempts to fix tests to prevent pulluting test users with "Unknown" * No deleting users. * Unit tests checking that first/last names are updated for SSO users When an SSO user is first logged in, they might not have first_name and/or last_name keys. This is allowed, but the names will be "Unknown" in the app-db. Subsequently, a User may log in again with SSO but have fisrt/last name attributes, which should update the Metabase user data in the app-db. These unit tests set up such a scenario to check that the :first_name and :last_name keys are indeed updated. * Adjust Enterprise LDAP to also use SSO-UTILS Trying to unify the LDAP implementation with JWT/SAML a bit here. * Lint error * Reverting LDAP ns changes to get the PR unstuck This is to keep the ball rolling on SSO fixes. I'll add LDAP as an item in the Epic to address this separately.
-
Nick Fitzpatrick authored
Adding action button to Question Page
-
Anton Kulyk authored
-
Anton Kulyk authored
* Add new cache info types * Add model cache info mock factory * Add `checkCanRefreshModelCache` utility * Handle new states on model page caching section * Handle new states on Tools page * Fix svg import type error * Use "queued" for `creating` state * Fix tests
-
Alexander Polyankin authored
-
Alexander Polyankin authored
-
- Jun 01, 2022
-
-
Alexander Polyankin authored
-
- May 31, 2022
-
-
Alexander Polyankin authored
-
- May 30, 2022
-
-
Anton Kulyk authored
-
Ngoc Khuat authored
remove param_values hydration keys
-
Alexander Polyankin authored
-
- May 26, 2022
-
-
Alexander Polyankin authored
-
Anton Kulyk authored
-
- May 25, 2022
-
-
Anton Kulyk authored
-
- May 19, 2022
-
-
Case Nelson authored
Since this information is used in the model cache logging screen accessible by monitoring users, :monitoring rather than :setting permission is the correct one.
-
Cam Saul authored
* `defsetting` setter functions should end in `!` * Fix typo * Update .clj-kondo/hooks/metabase/models/setting.clj * Fix clj-kondo for Toucan defmodel not emitting a docstring * Remove `^:private` metadata on a couple of Settings since it makes Eastwood fussy
-
Nick Fitzpatrick authored
Allow font selection in embedded widgets
-
Anton Kulyk authored
* Add `PLUGIN_MODEL_PERSISTENCE` plugin * Remove persist/unpersist actions * Move model cache control to enterprise folder * Move model cache management to enterprise folder * Add `setPersisted` method to `Question` * Refresh state when toggling model level persistence
-
- May 17, 2022
-
-
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:
Nick Fitzpatrick <nick@metabase.com>
-
-
- May 16, 2022
-
-
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:
Anton Kulyk <kuliks.anton@gmail.com>
-
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:
Nick Fitzpatrick <nick@metabase.com>
-
Noah Moss authored
-
- May 13, 2022
-
-
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
-
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.
-
- May 12, 2022
-
-
Cam Saul authored
-
- May 11, 2022
-
-
Case Nelson authored
* Only apply persistence substitution when there's no sandboxing * Added test for sandboxed persistence * Recursively apply persisted-info/native queries * Move test into permissions test that has ee code
-
- May 10, 2022
-
-
Alexander Kiselev authored
-
Alexander Lesnenko authored
-
- May 09, 2022
-
-
Ngoc Khuat authored
* fix ldap requires uid to do group sync * fix ee test
-