Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
tiancaiamao committed May 8, 2019
1 parent f1363e4 commit 9d2a773
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion privilege/privileges/privileges.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ func (p *UserPrivileges) DBIsVisible(activeRoles []*auth.RoleIdentity, db string
if mysqlPriv.DBIsVisible(p.user, p.host, db) {
return true
}
for _, role := range activeRoles {
allRoles := mysqlPriv.FindAllRole(activeRoles)
for _, role := range allRoles {
if mysqlPriv.DBIsVisible(role.Username, role.Hostname, db) {
return true
}
Expand Down

0 comments on commit 9d2a773

Please sign in to comment.