(rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin bool)
| 520 | } |
| 521 | |
| 522 | func makeUserFlags(rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin bool) (result []string) { |
| 523 | if rolsuper { |
| 524 | result = append(result, constants.RoleFlagSuperuser) |
| 525 | } |
| 526 | if rolinherit { |
| 527 | result = append(result, constants.RoleFlagInherit) |
| 528 | } |
| 529 | if rolcreaterole { |
| 530 | result = append(result, constants.RoleFlagCreateRole) |
| 531 | } |
| 532 | if rolcreatedb { |
| 533 | result = append(result, constants.RoleFlagCreateDB) |
| 534 | } |
| 535 | if rolcanlogin { |
| 536 | result = append(result, constants.RoleFlagLogin) |
| 537 | } |
| 538 | |
| 539 | return result |
| 540 | } |
| 541 | |
| 542 | func (c *Cluster) getOwnerRoles(dbObjPath string, withUser bool) (owners []string) { |
| 543 | owners = append(owners, dbObjPath+constants.OwnerRoleNameSuffix) |
no outgoing calls
no test coverage detected