Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Oct 21, 2024
  2. Oct 18, 2024
  3. Oct 17, 2024
  4. Oct 16, 2024
    • dpsutton's avatar
      Let non-admins see tables in recents (#48769) · deac5cbc
      dpsutton authored
      * Let non-admins see tables in recents
      
      ```shell
      ❯ http get "localhost:3000/api/activity/recents?context=views" Cookie:"metabase.SESSION=ba..3d" -pb
      {
          "recents": [
              {
                  "can_write": false,
                  "database": {
                      "id": 6,
                      "initial_sync_status": "complete",
                      "name": "pg restaurants"
                  },
                  "description": null,
                  "display_name": "Restaurants",
                  "id": 112,
                  "model": "table",
                  "name": "restaurants",
                  "table_schema": "public",
                  "timestamp": "2024-10-15T22:11:39.412100Z"
              },
              {
                  "can_write": false,
                  "database": {
                      "id": 6,
                      "initial_sync_status": "complete",
                      "name": "pg restaurants"
                  },
                  "description": null,
                  "display_name": "Reviews",
                  "id": 110,
                  "model": "table",
                  "name": "reviews",
                  "table_schema": "public",
                  "timestamp": "2024-10-15T19:53:19.999445Z"
              }
          ]
      }
      ```
      
      We were getting permissions of a "fake" table. Instead, let the db
      select it and get the proper stuff. Worked for admins because
      mi/can-read? is presumably always true for tables, and worked in tests
      because we mocked mi/can-read?
      
      * bump ci
      deac5cbc
Loading