Rename Topic to TopicPattern in Grant

This commit is contained in:
Philipp Heckel 2022-01-31 11:47:30 -05:00
parent c56814e7da
commit 936e95fd9e
3 changed files with 10 additions and 10 deletions

View file

@ -63,9 +63,9 @@ type User struct {
// Grant is a struct that represents an access control entry to a topic
type Grant struct {
Topic string
Read bool
Write bool
TopicPattern string // May include wildcard (*)
Read bool
Write bool
}
// Permission represents a read or write permission to a topic

View file

@ -280,9 +280,9 @@ func (a *SQLiteAuth) readGrants(username string) ([]Grant, error) {
return nil, err
}
grants = append(grants, Grant{
Topic: fromSQLWildcard(topic),
Read: read,
Write: write,
TopicPattern: fromSQLWildcard(topic),
Read: read,
Write: write,
})
}
return grants, nil