Skip to content

Commit

Permalink
update table operation permission check
Browse files Browse the repository at this point in the history
  • Loading branch information
cg33 committed Feb 16, 2020
1 parent 9cf3f34 commit f86f4bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/admin/modules/table/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,27 +340,27 @@ func (tb DefaultTable) GetForm() *types.FormPanel {
}

func (tb DefaultTable) GetCanAdd() bool {
return tb.canAdd && !tb.info.IsHideNewButton
return tb.canAdd
}

func (tb DefaultTable) GetPrimaryKey() PrimaryKey {
return tb.primaryKey
}

func (tb DefaultTable) GetEditable() bool {
return tb.editable && !tb.info.IsHideEditButton
return tb.editable
}

func (tb DefaultTable) GetDeletable() bool {
return tb.deletable && !tb.info.IsHideDeleteButton
return tb.deletable
}

func (tb DefaultTable) IsShowDetail() bool {
return !tb.info.IsHideDetailButton
}

func (tb DefaultTable) GetExportable() bool {
return tb.exportable && !tb.info.IsHideExportButton
return tb.exportable
}

// GetData query the data set.
Expand Down

0 comments on commit f86f4bf

Please sign in to comment.