Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. May 11, 2022
  2. May 09, 2022
  3. May 06, 2022
  4. Apr 29, 2022
  5. Apr 28, 2022
  6. Apr 27, 2022
    • Noah Moss's avatar
      `defenterprise` macro (#21672) · 8f9b5957
      Noah Moss authored
      * scaffolding, docstring & arg parsing
      
      * tweaks
      
      * registry and basic oss->ee dispatch
      
      * stubbed defenterprise-ee
      
      * full defenterprise-ee impl
      
      * fix build and tweak docstring
      
      * remove debug code
      
      * basic tests
      
      * use defonce
      
      * support for :any feature
      
      * schema support
      
      * fix schema test
      
      * switch to using format
      
      * support for schema on return val
      
      * tweak macro
      
      * move schema validation to submacros
      
      * do ee fn resolution at runtime
      
      * do conditionals at macro-expansion time
      
      * adjust semantics & refactor
      
      * fix test
      
      * add memoization for ee resolution
      
      * fix tests
      
      * emit register-mapping! call to avoid eval
      
      * call starts-with on symbol
      
      * remove schema support
      
      * use spec for arg parsing, generate fns, and remove :error fallback option
      
      * clean ns
      
      * change schema alias to schema
      
      * add :arglists meta and small refactor
      
      * refactor
      
      * move EE logic to fn
      
      * validate that the correct args are passed in EE/OSS namespaces, and make :feature required
      
      * remove logic for handling nil :feature
      
      * fix lint errors
      
      * fix ee macros
      
      * defenterprise-schema macro & tests
      
      * clean ns
      
      * propogate metadata
      
      * don't memoize ee resolution in dev to make debugging easier
      
      * dont do ee fn resolution during macroexpansion
      
      * minor refactor and cleanup
      
      * major refactor
      
      * update docstrings
      
      * more docstring tweaks
      
      * try to fix lint error on ldap PR
      
      * use dan's suggestion
      Unverified
      8f9b5957
  7. Apr 22, 2022
    • Ngoc Khuat's avatar
      Make /api/user works with Group managers (#21794) · 3675e8b4
      Ngoc Khuat authored
      
      * Make /api/user works with Group manager
      
      * add tests
      
      * fix linting
      
      * hope clj-kondo is happpy now
      
      * update docs
      
      * nit
      
      * GET /api/user/:id returns user_group_memberships and allow group manager
      
      * return additional fields if caller is Group Manager
      
      * fix ns
      
      * use set instead of list in tests
      
      * POST /api/user/:id takes user_group_memberships too
      
      * address Noah's comments
      
      * typo
      
      * sort by superuser -> group managers -> normal user when filter by group-id
      
      * FE: Group managers  (#21111)
      
      * group managers ui
      
      * update specs
      
      * review
      
      * review
      
      * fix merge
      
      Co-authored-by: default avatarAlexander Lesnenko <alxnddr@users.noreply.github.com>
      Co-authored-by: default avatarAleksandr Lesnenko <alxnddr@gmail.com>
      Unverified
      3675e8b4
  8. Apr 21, 2022
  9. Apr 19, 2022
    • Braden Shepherdson's avatar
      Make namespace aliasing consistent everywhere; enforce with clj-kondo (#21738) · 19beda53
      Braden Shepherdson authored
      * Make namespace aliasing consistent everywhere; enforce with clj-kondo
      
      See the table of aliases in .clj-kondo/config.edn
      
      Notable patterns:
      - `[metabase.api.foo :as api.foo]`
      - `[metabase.models.foo :as foo]`
      - `[metabase.query-processor.foo :as qp.foo]`
      - `[metabase.server.middleware.foo :as mw.foo]`
      - `[metabase.util.foo :as u.foo]`
      - `[clj-http.client :as http]` and `[metabase.http-client :as client]`
      
      Fixes #19930.
      Unverified
      19beda53
  10. Apr 18, 2022
    • Noah Moss's avatar
      Fixes to DB and data model perm enforcement for users without data perms (#21699) · 89d75060
      Noah Moss authored
      
      * fix DB perm enforcement for users without data perms
      
      * update table perm checks
      
      * fix output of helper fn
      
      * revise approach
      
      * fix table read path
      
      * remove blank line
      
      * refactor and cleanup
      
      * syntax fix
      
      * add tests
      
      * fix test
      
      * another test
      
      * typo
      
      * fix more tests
      
      * make perm test helper more robust to fix final test failures
      
      * clean ns
      
      * grant read perms for a DB if a user has only data model perms, using a special :data-model perms object set
      
      * Revert "grant read perms for a DB if a user has only data model perms, using a special :data-model perms object set"
      
      This reverts commit f6cb724e513f6be5a26bc7252ffea30c192dfc8b.
      
      * change exclude-uneditable-data-model? to include-editable-data-model?
      
      * also adjust behavior & flag on /api/database/:id/metadata
      
      * update FE data model flags
      
      * one more datamodel fe query param
      
      * also add include_editable_data_model flag to /api/database/:id
      
      * a couple of more places for new query params
      
      * add include_editable_data_model query parameter to data model page requests
      
      * fix variable name
      
      * docstring fixes
      
      * fix test helper
      
      * fix perm check in /api/database/:id
      
      * try to fix cypress test
      
      Co-authored-by: default avatarAleksandr Lesnenko <alxnddr@gmail.com>
      Unverified
      89d75060
    • Maz Ameli's avatar
      Tweaks to permissions strings (#21704) · d0f3fea4
      Maz Ameli authored
      
      * change the General permissions to Application
      
      * rename general permissions to application permissions
      
      * BE: Rename General Perms to Application Perms (#21709)
      
      * BE: Change General Perms to Application Perms
      
      * lint migration file
      
      * add migration to update seq name
      
      * update application perms graph endpoint in fe
      
      Co-authored-by: default avatarAleksandr Lesnenko <alxnddr@gmail.com>
      Co-authored-by: default avatarNgoc Khuat <qn.khuat@gmail.com>
      Unverified
      d0f3fea4
  11. Apr 15, 2022
    • Ngoc Khuat's avatar
      BE: Group Manager - Permissions enforcement (#21554) · d3807aff
      Ngoc Khuat authored
      
      * add is_group_manager and hydrate it
      
      * update test title
      
      * fix namespaces and 1 test
      
      * update docstring and make sure the is-group-manager? is converted to boolean in any db
      
      * even more docstring
      
      * fix ns
      
      * Fix a test appeared when merge with master
      
      * add tests and more api enforcement
      
      * appease linter and make sure the test can run in ee
      
      * update by membership id
      
      * one dot
      
      * update docs
      
      * make is_group_manager optional
      
      * hydrate is_group_manager when get single group
      
      * - Split the `check-group-manager` into 2 functions
      - Address Noah's comments
      
      * Update enterprise/backend/test/metabase_enterprise/advanced_permissions/api/group_manager_test.clj
      
      Co-authored-by: default avatarNoah Moss <32746338+noahmoss@users.noreply.github.com>
      
      * change is_group_manager in to bool instead of boolstring
      
      * remove debug code
      
      Co-authored-by: default avatarNoah Moss <32746338+noahmoss@users.noreply.github.com>
      Unverified
      d3807aff
  12. Apr 14, 2022
    • Ngoc Khuat's avatar
      BE: Enforce Monitoring Permissions APIs (cont) (#21630) · 8cd304ad
      Ngoc Khuat authored
      * disallow adding recipients by non-admins with monitoring permission
      
      * enforce sharing and embedding apis
      
      * enforce update monitoring perms for alert, pulse and tasks API
      
      * add minor test cases
      
      * remove debug code
      
      * linting
      
      * fix  not able to remove users from pulse and make sure our tests cover that case
      
      * address Noah's comments
      
      * one space
      Unverified
      8cd304ad
  13. Apr 13, 2022
  14. Apr 12, 2022
  15. Apr 10, 2022
  16. Apr 08, 2022
  17. Apr 07, 2022
    • Noah Moss's avatar
      Data model permission enforcement part 2 (#21475) · e86e80ad
      Noah Moss authored
      * add can_access_data_model key to api/user/current
      
      * add exclude_uneditable flag to /api/database/:id/metadata
      
      * clean ns
      
      * WIP figuring out how to update perm checks for Field model
      
      * fix errors
      
      * fix more errors
      
      * tests for field APIs
      
      * table perms changes
      
      * tests for table API
      
      * fix function call
      
      * clean ns
      
      * perm enforcement for other table APIs
      
      * perm enforcement for other field APIs
      
      * address comments
      Unverified
      e86e80ad
    • Ngoc Khuat's avatar
      Fix SSO failed to sync admin group (#20991) · 0708ce0a
      Ngoc Khuat authored
      * fix failed to sync admin group
      
      * address noah's comments and add migration script
      
      * document for run-with-data-migration-index
      
      * update comments
      
      * fix name space
      
      * adding data_migrations tests
      
      * add docg
      
      * make sure we don't remove admin group if sso and ldap are not configured
      
      * fix tests for be-ee
      
      * fix tests for oss
      
      * misc docs updates
      
      * remove data-migration-index
      
      * return some newlines
      
      * is it failling here?
      
      * update data_migration docs
      
      * update data_migration docs
      
      * fix all styling comments
      
      * make migration to run both in oss and enterprise and make sure the tests are accounted for that
      
      * fix failed namespace checks
      
      * Add a comment to the test
      
      * fix per comments
      
      * Update permissions.clj
      
      * tweaking with the :warning: icon
      
      * refactor with-temporary-raw-setting-values
      
      * update comments
      
      * Add extension for cert file
      
      * address Noah's comments
      Unverified
      0708ce0a
  18. Apr 06, 2022
  19. Apr 05, 2022
    • Cam Saul's avatar
      Clear out existing DashboardCards when running `load` with `--mode update` (#21241) · f63aa430
      Cam Saul authored
      * Clear out existing DashboardCards when running load with --mode update
      
      * Namespace cleanup
      
      * Fix circular references
      
      * Another test fix
      
      * Settings cache needs to be per-app-DB
      
      * (Experimental -- new application DB dynamic var)
      
      * Create truly rebindable `metabase.db.connection/*application-db*`
      
      * call-on-change-fn -> call-on-change
      
      * Revert unneeded commit
      
      * Namespace cleanup
      
      * Add missing docstrings
      
      * Appease linters again
      
      * Fix handler stats logging middleware
      
      * PR feedback
      
      * PR feedback: slight optimization
      
      * Remove NOCOMMIT
      
      * PR feedback
      
      * Clean namespace
      Unverified
      f63aa430
  20. Apr 04, 2022
  21. Apr 01, 2022
    • Noah Moss's avatar
      QP middleware for download perms (#21021) · 04473fc5
      Noah Moss authored
      Unverified
      04473fc5
    • Ngoc Khuat's avatar
      Grant Subscription permission by default (#21179) · e36304ec
      Ngoc Khuat authored
      * add API to fetch general permisisons graph
      
      * add API to update general permissionns
      
      * change author of migration
      
      * update documents
      
      * misc fixes to applease the CIs
      
      * Add tests for general permission APIs and models
      
      * linting and fix a failed test case
      
      * fix some failed tests
      
      * update docs and change /subscription/ to /general/subscription/ for consistency
      
      * Hook and migration to make sure subscription are created for new groups by default
      
      * add schema migrations tests
      
      * set for the win
      
      * address noah's comments
      
      * Parse number as is in http-client for tests
      
      * address Cam's comments
      
      * revert the last commit about parsing API response in tests
      
      * change fk name
      
      * delete a comment
      
      * Changes:
      - Rename `changes` column to `after` to keep things consistent
      - If a group  has no General Permisions, it'll not be included in the graph
      - Update tests and some docs
      
      * fix failing tests in ee
      
      * add some tests and make docstring completes
      
      * polishing comments
      
      * namespaces
      
      * fix namespaces
      
      * Add general permisison flags to `GET /api/user/current` (#21250)
      
      * return general permisison flags for /api/current
      
      * namespaces
      
      * move permission flags to under
      
      * Enforce Subscription permissions (#21285)
      
      * return general permisison flags for /api/current
      
      * namespaces
      
      * enforce general permissions for subscription and tests
      
      * update check-has-general-permisison to add option to require superuser
      
      * adding arity
      
      * add tests for permissions helper function
      
      * Move advanced permissions check funcs to ee namespace
      
      * unpushed changes
      
      * namespaces
      
      * ignore exception when load namespaces
      
      * change helper fn name
      
      * Enforce Monitoring Permissions (#21321)
      
      * return general permisison flags for /api/current
      
      * namespaces
      
      * enforce general permissions for subscription and tests
      
      * update check-has-general-permisison to add option to require superuser
      
      * adding arity
      
      * enforce permissions to call /api/dataset for internal queries
      
      * enforce monitoring permissions for api/task and api/util
      
      * add tests for OSS
      
      * add tests for db-connection-info endpoint
      
      * change test schema
      
      * update name func and fix ns
      
      * whydon't CI run ?
      
      * Enforce Setting Permissions (#21386)
      
      * return general permisison flags for /api/current
      
      * namespaces
      
      * enforce general permissions for subscription and tests
      
      * update check-has-general-permisison to add option to require superuser
      
      * adding arity
      
      * enforce permissions to call /api/dataset for internal queries
      
      * enforce monitoring permissions for api/task and api/util
      
      * add tests for OSS
      
      * add tests for db-connection-info endpoint
      
      * change test schema
      
      * update name func and fix ns
      
      * whydon't CI run ?
      
      * Enforce Setting permissions
      
      * fix failing test
      
      * make sure we could run slack test twice
      
      * make the mock consistent
      
      * address Noah's comments
      
      * shorter permissions check
      Unverified
      e36304ec
    • Noah Moss's avatar
      Unverified
      01092b5c
    • Noah Moss's avatar
      Data model permission writes & reads (#21168) · 2d81ec58
      Noah Moss authored
      Unverified
      2d81ec58
  22. Mar 29, 2022
    • Noah Moss's avatar
    • Ngoc Khuat's avatar
      Add General Permissions graph APIs (#21124) · 57d0ff0a
      Ngoc Khuat authored
      * add API to fetch general permisisons graph
      
      * add API to update general permissionns
      
      * change author of migration
      
      * update documents
      
      * misc fixes to applease the CIs
      
      * Add tests for general permission APIs and models
      
      * linting and fix a failed test case
      
      * fix some failed tests
      
      * update docs and change /subscription/ to /general/subscription/ for consistency
      
      * address noah's comments
      
      * Parse number as is in http-client for tests
      
      * revert the last commit about parsing API response in tests
      
      * change fk name
      
      * Changes:
      - Rename `changes` column to `after` to keep things consistent
      - If a group  has no General Permisions, it'll not be included in the graph
      - Update tests and some docs
      
      * fix failing tests in ee
      
      * add some tests and make docstring completes
      
      * fix namespaces
      Unverified
      57d0ff0a
  23. Mar 28, 2022
  24. Mar 23, 2022
  25. Mar 15, 2022
  26. Mar 14, 2022
  27. Feb 23, 2022
  28. Feb 17, 2022
  29. Feb 16, 2022
  30. Feb 08, 2022
    • Jeff Evans's avatar
      Remove :bigquery driver (#20142) · 22ebe102
      Jeff Evans authored
      
      * Remove :bigquery driver
      
      Add "migration" to convert existing Database instances from :bigquery to :bigquery-cloud-sdk (with error log if using outdated OAuth mechanisms), by way of `normalize-db-details`
      
      Removing references to :bigquery from various places in the code
      
      * Remove from modules/drivers/deps.edn
      
      * Remove stuff from CircleCI that is running the old driver
      
      Remove `driver-switch-test` since there is no practical way to run this anymore (since we can't initialize the old driver)
      
      Remove buggy redef of `isa?` from `semantic-type-migration-tests`
      
      Co-authored-by: default avatarCam Saul <github@camsaul.com>
      Unverified
      22ebe102
    • Cam Saul's avatar
      Rework how the remappings middleware matches remapped to/from columns for... · e35ecaca
      Cam Saul authored
      Rework how the remappings middleware matches remapped to/from columns for explicit external (FK) remaps (#20009)
      
      * Fix #9236 [WIP]
      
      * Revert unneeded changes
      
      * Only merge namespaced :options into result info
      
      * Revert unneeded changes
      
      * Everything is working :scream_cat:
      
      * Revert unneeded change
      
      * Clean namespaces
      
      * Add `:test` profile to `namespace-checker` to suppress log messages.
      
      * PR feedback
      
      * Fix namespaces
      Unverified
      e35ecaca
Loading