Skip to content

Commit

Permalink
feat: Remove underscores from the getFullTableName method when they a…
Browse files Browse the repository at this point in the history
…re present (#241)

* feat: remove the underscore from the getFullTableName method

* fix: Remove underscores from the getFullTableName method when they are present
  • Loading branch information
chenxi2015 authored Jul 19, 2024
1 parent 9ad4075 commit 6a0d216
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,9 @@ func (a *Adapter) getTableInstance() *CasbinRule {

func (a *Adapter) getFullTableName() string {
if a.tablePrefix != "" {
if strings.HasSuffix(a.tablePrefix, "_") {
return a.tablePrefix + a.tableName
}
return a.tablePrefix + "_" + a.tableName
}
return a.tableName
Expand Down

0 comments on commit 6a0d216

Please sign in to comment.