-
Bryan Maass authored
insert next-gen permission paths alongside currently active permission paths + classification (#27911) * implement move, which returns v2 paths - TODO: insert these into the db (move v1-path) => [v2 paths] * cleanup + add some schemas * generative tests 4 permission path classification * whitespace lint * detect data, query, and paths for v2 * calling move on v2 paths is a no-op * differentiate between v1 and v2 permissions quickchecking for move, classify-path, and classify-data-path * fix tests + add idempotency test * add tests for classification of permission paths - rename move to ->v2-path - move some fxns around - ascii art in test * making the legos line up - need to insert both v1 and v2 versions of paths (of course) - valid-path? has to allow v2 paths to be inserted * replace mu/with-api-error-message * linter + code quality fixes * privatize rx->kind * remove some changes that should be 4 anotherbranch * revert ns * delete v2 permissions in - they aren't handled by the perm graph parser, so they don't get propagated into "old graph", so the diff between old and new indicates that they need to be rewritten. * only delete v2 paths for the current group_id - reorder declarations in models.permissions * remove extra line break * Update src/metabase/models/permissions.clj fix typo Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com> --------- Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com>
Bryan Maass authoredinsert next-gen permission paths alongside currently active permission paths + classification (#27911) * implement move, which returns v2 paths - TODO: insert these into the db (move v1-path) => [v2 paths] * cleanup + add some schemas * generative tests 4 permission path classification * whitespace lint * detect data, query, and paths for v2 * calling move on v2 paths is a no-op * differentiate between v1 and v2 permissions quickchecking for move, classify-path, and classify-data-path * fix tests + add idempotency test * add tests for classification of permission paths - rename move to ->v2-path - move some fxns around - ascii art in test * making the legos line up - need to insert both v1 and v2 versions of paths (of course) - valid-path? has to allow v2 paths to be inserted * replace mu/with-api-error-message * linter + code quality fixes * privatize rx->kind * remove some changes that should be 4 anotherbranch * revert ns * delete v2 permissions in - they aren't handled by the perm graph parser, so they don't get propagated into "old graph", so the diff between old and new indicates that they need to be rewritten. * only delete v2 paths for the current group_id - reorder declarations in models.permissions * remove extra line break * Update src/metabase/models/permissions.clj fix typo Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com> --------- Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com>
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
.dir-locals.el 4.42 KiB
((nil
;; always use spaces for tabs
(indent-tabs-mode . nil)
;; add final newline on save
(require-final-newline . t)
;; prefer keeping source width about ~118, GitHub seems to cut off stuff at either 119 or 120 and it's nicer
;; to look at code in GH when you don't have to scroll back and forth
(fill-column . 118)
;; tell find-things-fast to always use this directory as project root regardless of presence of other
;; deps.edn files
(ftf-project-finders . (ftf-get-top-git-dir)))
(js2-mode
;; these settings will let flycheck do everything through eslint,
(js2-mode-show-parse-errors . nil)
;; because js2-mode can't handle flowtype
(js2-mode-show-strict-warnings . nil))
(clojure-mode
;; Specify which arg is the docstring for certain macros
;; (Add more as needed)
(eval . (put 'defendpoint-schema 'clojure-doc-string-elt 3))
(eval . (put 'defendpoint 'clojure-doc-string-elt 3))
(eval . (put 'defendpoint-async 'clojure-doc-string-elt 3))
(eval . (put 'define-premium-feature 'clojure-doc-string-elt 2))
(eval . (put 'api/defendpoint-schema 'clojure-doc-string-elt 3))
(eval . (put 'api/defendpoint 'clojure-doc-string-elt 3))
(eval . (put 'api/defendpoint-async 'clojure-doc-string-elt 3))
(eval . (put 'defsetting 'clojure-doc-string-elt 2))
(eval . (put 'setting/defsetting 'clojure-doc-string-elt 2))
(eval . (put 's/defn 'clojure-doc-string-elt 2))
(eval . (put 'p.types/defprotocol+ 'clojure-doc-string-elt 2))
(eval . (put 'methodical/defmethod 'clojure-doc-string-elt 3))
(eval . (put 'methodical/defmulti 'clojure-doc-string-elt 2))
(eval . (put 'mi/define-simple-hydration-method 'clojure-doc-string-elt 3))
(eval . (put 'mi/define-batched-hydration-method 'clojure-doc-string-elt 3))
(eval . (put 'mu/defn 'clojure-doc-string-elt 2))
;; Define custom indentation for functions inside metabase.
;; This list isn't complete; add more forms as we come across them.
;;
;; `put-clojure-indent' is a safe-local-eval-function, so use a bunch of calls to that
;; instead of one call to `define-clojure-indent'
(eval . (put-clojure-indent 'api/let-404 1))
(eval . (put-clojure-indent 'c/step 1))
(eval . (put-clojure-indent 'impl/test-migrations 2))
(eval . (put-clojure-indent 'let-404 0))
(eval . (put-clojure-indent 'macros/case 0))
(eval . (put-clojure-indent 'match 1))
(eval . (put-clojure-indent 'mbql.match/match 1))
(eval . (put-clojure-indent 'mbql.match/match-one 1))
(eval . (put-clojure-indent 'mbql.match/replace 1))
(eval . (put-clojure-indent 'mbql.match/replace-in 2))
(eval . (put-clojure-indent 'mi/define-methods '(:form)))
(eval . (put-clojure-indent 'mt/dataset 1))
(eval . (put-clojure-indent 'mt/format-rows-by 1))
(eval . (put-clojure-indent 'mt/query 1))
(eval . (put-clojure-indent 'mt/test-drivers 1))
(eval . (put-clojure-indent 'mt/test-driver 1))
(eval . (put-clojure-indent 'prop/for-all 1))
(eval . (put-clojure-indent 'qp.streaming/streaming-response 1))
(eval . (put-clojure-indent 'u/prog1 1))
(eval . (put-clojure-indent 'u/select-keys-when 1))
(eval . (put-clojure-indent 'with-meta '(:form)))
(eval . (put-clojure-indent 'tc/quick-check 1))
;; these ones have to be done with `define-clojure-indent' for now because of upstream bug
;; https://github.com/clojure-emacs/clojure-mode/issues/600 once that's resolved we should use `put-clojure-indent'
;; instead. Please don't add new entries unless they don't work with `put-clojure-indent'
(eval . (define-clojure-indent
(l/matcha '(1 (:defn)))
(l/matche '(1 (:defn)))