Skip to content
Snippets Groups Projects
Commit 8941c289 authored by Tom Robinson's avatar Tom Robinson Committed by GitHub
Browse files

Merge pull request #3871 from metabase/add-can-write-to-GET-card-endpoint

Include :can_write with GET /api/card/:id
parents f7f59593 5efa6d5d
No related merge requests found
......@@ -207,7 +207,7 @@ export default class QueryHeader extends Component {
}
// persistence buttons on saved cards
if (!isNew) {
if (!isNew && card.can_write) {
if (!isEditing) {
if (this.state.recentlySaved) {
// existing card + not editing + recently saved = save confirmation
......@@ -219,7 +219,6 @@ export default class QueryHeader extends Component {
</span>
</button>
]);
} else {
// edit button
buttonSections.push([
......
......@@ -203,7 +203,7 @@
"Get `Card` with ID."
[id]
(-> (read-check Card id)
(hydrate :creator :dashboard_count :labels :collection)
(hydrate :creator :dashboard_count :labels :can_write :collection)
(assoc :actor_id *current-user-id*)
(->> (events/publish-event! :card-read))
(dissoc :actor_id)))
......
......@@ -186,6 +186,7 @@
:id $
:display "table"
:visualization_settings {}
:can_write true
:created_at $
:database_id database-id ; these should be inferred from the dataset_query
:table_id table-id
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment