Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Feb 23, 2023
    • Cam Saul's avatar
      Snowflake Honey SQL 2 (#28478) · e3d817a4
      Cam Saul authored
      * Snowflake Honey SQL 2
      
      * Test fix :wrench:
      
      * Use Honey SQL 2 for GTAP compilation in sandboxing tests
      
      * Test fix :wrench:
      Unverified
      e3d817a4
    • Noah Moss's avatar
      Clojure migration to split v1 data perm paths into v2 data & query perms (#28350) · cde7ff70
      Noah Moss authored
      * new clojure migration for v1->v2 permissions
      
      * updates
      
      * fix rebase issue
      
      * fix reflection warning
      
      * fix final test and address comment about macro name
      
      * fix indentation
      
      * revert changes to defmigration macro to try to fix final test
      Unverified
      cde7ff70
    • Cal Herries's avatar
      Allow actions to run on H2 and sample database (#28212) · 6ad641d8
      Cal Herries authored
      
      * Decouple checking ddl from classifying h2 stmts
      
      - should enable followup for easily blocking more kinds of queries
      - check all statements to make sure they aren't "ddl".
      
      * fix classify-query
      
      * linter fixes + get-field refactor
      
      * return the CommandInterface values as ints
      
      Reach into the CommandList when needed
      
      * docstring wording
      
      * catch invalid queries -- they can't be classified
      
      * Remove action subtypes from inlined-models
      
      * Add ddl check for `execute-write-query!`
      
      * Remove ACCESS_MODE_DATA
      
      * Check queries are single select statements
      
      * Add test for sample database privileges
      
      * Fix single-select check
      
      * Add single-select test
      
      * Rename and add more tests for checking read only commands
      
      * commands -> statements
      
      * Fix check-disallow-ddl-commands
      
      * new line
      
      * Add more read-only statements to the tests
      
      * Update error text
      
      * Use are
      
      * Add integration test for executing actions with disallowed commands
      
      * Add test before inserting row
      
      * Run GRANT ALL ON SCHEMA "PUBLIC" TO GUEST
      
      * Restore classify-query
      
      * whitespace
      
      ---------
      
      Co-authored-by: default avatarBryan Maass <bryan.maass@gmail.com>
      Unverified
      6ad641d8
    • Ngoc Khuat's avatar
      BE: Skip link cards and actions when generate subscriptions contents (#28519) · 6d988438
      Ngoc Khuat authored
      * add logics to skip generate subscription contents for link cards and actions
      Unverified
      6d988438
    • Tim Macdonald's avatar
      Add model_id to action search results so that URLs can be made (#28566) · 6ec4b1d5
      Tim Macdonald authored
      * Add `model_id` to action search results so that URLs can be made
      
      [Fixes #28565]
      
      * Fix typo in Cypress filename
      Unverified
      6ec4b1d5
    • Case Nelson's avatar
      Strip semicolons from card refs in native queries (#28507) · f8b048c8
      Case Nelson authored
      * Strip semicolons from card refs in native queries
      
      Fixes #28218
      
      While source-query substitution handled semicolons in native questions
      within outer mbql queries, we used a different code path when splicing
      into native queries. This brings the two paths inline.
      
      * Reference issue in testing
      
      * Add docstring
      Unverified
      f8b048c8
  2. Feb 22, 2023
    • metamben's avatar
      Resolve nested questions in native queries (#28511) · 19eb288b
      metamben authored
      * Resolve nested questions in native queries
      
      Fixes #25988.
      Unverified
      19eb288b
    • Bryan Maass's avatar
      Decouple checking ddl from classifying h2 stmts (#28510) · 3f220001
      Bryan Maass authored
      * Decouple checking ddl from classifying h2 stmts
      
      - should enable followup for easily blocking more kinds of queries
      - check all statements to make sure they aren't "ddl".
      
      * fix classify-query
      
      * linter fixes + get-field refactor
      
      * return the CommandInterface values as ints
      
      Reach into the CommandList when needed
      
      * docstring wording
      
      * catch invalid queries -- they can't be classified
      
      * respond to review comments
      
      - fix see: comment
      - remove CommandList typehint
      - rename command-list -> command
      - skip checking disallowed ddl commands when query is `nil`
      
      then also:
      - fix a linter error
      - add a test for `nil` query ddl command checking
      
      * rename command-list-type -> first-command-type
      
      * fix schema + handle h2-parser build failure
      Unverified
      3f220001
    • Cal Herries's avatar
      Add `database_id` to implicit actions (except when it's persisted) (#28452) · 860befd6
      Cal Herries authored
      * Fix action loading and extraction of action type
      
      * Remove comment
      
      * Fix handling required parameters for public basic actions (#28415)
      
      * Fix presenting required parameters
      
      * Add tests
      
      * Add explanation text to the action editor (#28406)
      
      * Add explanation text to the action editor
      
      * Replace link
      
      * Add missing `nock.cleanAll` calls (#28441)
      
      * [CI] Improve `codenotify` workflow (#28432)
      
      * Add path filtering to codenotify workflow
      
      * Upgrade action to its latest version (v0.6.4)
      
      * [E2E] Prevent app permission flakes (#28445)
      
      * Ensure dashcards are deleted after actions are deleted (#28446)
      
      (c.f. discussion at https://metaboat.slack.com/archives/C04FG88HL95/p1676649795131089
      
      )
      
      * Show not found view when opening archived model (#28443)
      
      * Add `isArchived` method to `Question` class
      
      * Show nice not found view when opening archived model
      
      * [CI] Unify E2E tests workflows (#28431)
      
      * [Ci] Fix wildcard glob pattern in path filters (#28447)
      
      [ci skip]
      
      * Remove dupe tests
      
      * Add database_id to implicit actions
      
      * Tidy
      
      * Update select-actions docstring
      
      * Add test for database_id in action dashcards
      
      * Remove database_id before insert and update
      
      * whitespace
      
      * Refactor select-actions
      
      * Add database_id to action-create-test
      
      * Add test for create+update+select for implicit actions
      
      * Fix test
      
      * Remove conditional
      
      * style
      
      ---------
      
      Co-authored-by: default avatarAnton Kulyk <kuliks.anton@gmail.com>
      Co-authored-by: default avatarNemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
      Co-authored-by: default avatarTim Macdonald <tim@metabase.com>
      Unverified
      860befd6
    • Tim Macdonald's avatar
      Handle actions more gracefully when models are converted back to cards (#28521) · 237a86f9
      Tim Macdonald authored
      * If a model is converted to a card, archive the associated actions
      * If an action is unarchived and its model _is_ a card, throw an error
      Unverified
      237a86f9
  3. Feb 21, 2023
  4. Feb 20, 2023
    • Case Nelson's avatar
      Convert H2 driver to honey-sql-2 (#28273) · f827b28e
      Case Nelson authored
      
      * Fix linter
      
      * Make sure we're inlining num in substitution and sum aggregations
      
      * Set hsql version
      
      * Fixing tests
      
      * Fixing tests after the h2 conversion
      
      * Use h2x/extract in h2, fix test differences
      
      * Fixing tests for honeysql2
      
      * Only numbers get inlined
      
      * More test fixes
      
      * Fixing tests
      
      * Undo bad commit
      
      * Inline Ratio must produce doubles or h2 will do integer division where 1/2 = 0
      
      * Fix bad case statement
      
      * We can't run native queries with AS for oracle
      
      ---------
      
      Co-authored-by: default avatarCam Saul <github@camsaul.com>
      Co-authored-by: default avatarCam Saul <1455846+camsaul@users.noreply.github.com>
      Unverified
      f827b28e
    • metamben's avatar
      Mongo joins (#28293) · 32854d3c
      metamben authored
      * Make joins work
      
      * Run fuzzy-field-info-test only against H2
      
      * Set driver/*driver* when performing actions
      
      * Restrict expressions+joins-test to DBs supporting date arithmetics
      
      * Fix ordering of (top level) fields in mongo tables
      
      * Explicitly exclude mongo from tests requiring foreign key support
      
      * Optimize away $sort stage for implicit order-by.
      Unverified
      32854d3c
    • Cal Herries's avatar
      Fix serdes for query actions missing database dependency (#28449) · 83bf928b
      Cal Herries authored
      * Fix action loading and extraction of action type
      
      * Remove comment
      Unverified
      83bf928b
    • Ryan Laurie's avatar
      Metabase Entity Link Dashboard Cards (#28248) · d591f34a
      Ryan Laurie authored
      
      * add dashcard testing mocks
      
      * improve virtual card overlays
      
      * update types
      
      * add search entity types
      
      * add metabase entity support to link cards
      
      * simplify link displays
      
      * update types and support collections and tables
      
      * use edit button to replace entity
      
      * test entity links
      
      * fix rebase
      
      * update types
      
      * address review comments
      
      * handle restricted link entities
      
      * Hydrate link cards info (#28297)
      
      * hydrate link cards info
      
      * we need to hydrate collections too
      
      * Address Cal's comments:
      - model use keywrod -> string
      - use model hydration
      - comments here and there
      
      * Link cards serdes (#28321)
      
      ---------
      
      Co-authored-by: default avatarNgoc Khuat <qn.khuat@gmail.com>
      Unverified
      d591f34a
  5. Feb 17, 2023
  6. Feb 16, 2023
  7. Feb 15, 2023
  8. Feb 14, 2023
    • Bryan Maass's avatar
      v2 perm path graph creation (#28072) · f840a96b
      Bryan Maass authored
      * adding v2 data and query paths into the parser
      
      * add example test
      
      * adjust graph test output
      
      - seems kinda wrong, could use some guidance
      
      * add some more tests
      
      * temporarily add rcf tests
      
      * balance parens in deps.edn
      
      * dirty commit + making progress
      
      - need to make sure the spec is correct on this
      
      * tests for permission graph v2 api
      
      * Fix :data and :query keys in permissions graph v2
      
      - adds tests for v2 graph read endpoint
      - rename some malli schemas
      - remove a few simple defendpoint-schema
      
      * transfer rcf/tests into deftests
      
      - fix a bug with native data permission path parsing
      - remove inline defs
      - add more tests for v2 style permission path parsing
      
      * take out c.t.l/log
      
      * formatting
      
      * move more tests around
      
      * lint fix
      
      * update docstrings
      
      - add / remove newlines
      Unverified
      f840a96b
    • Cal Herries's avatar
      [Feature] Allow actions to be shared via public link: Milestone 2 (#27845) · ce64e033
      Cal Herries authored
      
      * Add public_uuid and made_public_by_id to actions table & endpoints to enable/disable the public sharing on individual actions (#27721)
      
      * Add migration for public_uuid (indexed) and made_public_by_id
      
      * Add UUIDString schema
      
      * Add endpoints for enabling/disabling sharing of actions
      
      * Test that the new fields are returned with `GET /api/action/:id`
      
      * Remove validCheckSum on migration
      
      * Remove trailing whitespace
      
      * Fix DELETE test
      
      * Fix tests
      
      * Please migration linter
      
      * Update the default public_uuid every test run
      
      * Please migration linter
      
      * Add FK onDelete cascade
      
      * Replace ü
      
      * Add GET endpoint and post-select for action
      
      * Revert "Add GET endpoint and post-select for action"
      
      This reverts commit 8cc8b57d6034146dd726b54bc4199830ec1fda21.
      
      * Fix merge
      
      * Reorder migrations
      
      * Update test for GET `api/action?model-id=<id>` endpoint to include public sharing keys (#27802)
      
      * Add GET: /api/public/action/:uuid endpoint (#27781)
      
      * Add test
      
      * Remove non-public columns and check for 404
      
      * Fix docstring
      
      * Rename for clarity
      
      * Fix missing ns
      
      * Remove unneccessary keys from action
      
      * Update test
      
      * Remove unused refer
      
      * Reorder migrations
      
      * Use mt
      
      * Add require and refactor
      
      * Use mt
      
      * Add endpoint for executing a public action (#27793)
      
      * Add endpoint and test
      
      * Add more tests and TODOs
      
      * Use mt
      
      * Reorder migrations
      
      * Remove unused require
      
      * Rate limit actions at 1 per second
      
      * Fix the tests for the throttle
      
      * Refactor tests
      
      * Fix test
      
      * Fix docstring
      
      * Add test for failed execution if actions are disabled
      
      * Use crowberto in tests
      
      * Fix using crowberto in tests
      
      * Fix cyclic load dependency
      
      * Add GET api/action/public endpoint
      
      * Use defendpoint
      
      * Add action-api-test
      
      * Add model_id to GET action/public response
      
      * Update GET api/action/public test for model_id
      
      * Add actions to public sharing admin settings (#27675)
      
      * Add actions to public sharing admin settings
      
      * Add public action in public sharing admin settings tests
      
      ---------
      
      Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
      Unverified
      ce64e033
    • Tim Macdonald's avatar
      Ensure actions are created with models (not cards) (#28299) · 54a56bab
      Tim Macdonald authored
      [Fixes #28298]
      Unverified
      54a56bab
    • Braden Shepherdson's avatar
      [metabase-lib] PoC for wrapping JS objects with cljs-bean in CLJC · 4c15f80c
      Braden Shepherdson authored
      A `metabase.domain-entities.malli/defn` macro that (in CLJS) uses the
      schemas for the arguments to drive wrapping of vanilla JS objects for
      idiomatic use in CLJC code.
      
      See the first two functions in `metabase.domain-entities.queries.util`
      which get passed vanilla JS objects but can use them as CLJS maps.
      4c15f80c
Loading