reflect some feedback
This commit is contained in:
		
							parent
							
								
									3e7e99039b
								
							
						
					
					
						commit
						61225998ff
					
				| 
						 | 
				
			
			@ -40,7 +40,7 @@ spec:
 | 
			
		|||
          properties:
 | 
			
		||||
            additionalSuperuserTeams:
 | 
			
		||||
              type: object
 | 
			
		||||
              description: "Map for teamId and associted additional superuser teams"
 | 
			
		||||
              description: "Map for teamId and associated additional superuser teams"
 | 
			
		||||
              additionalProperties:
 | 
			
		||||
                type: array
 | 
			
		||||
                nullable: true
 | 
			
		||||
| 
						 | 
				
			
			@ -49,7 +49,7 @@ spec:
 | 
			
		|||
                  type: string
 | 
			
		||||
            additionalTeams:
 | 
			
		||||
              type: object
 | 
			
		||||
              description: "Map for teamId and associted additional teams"
 | 
			
		||||
              description: "Map for teamId and associated additional teams"
 | 
			
		||||
              additionalProperties:
 | 
			
		||||
                type: array
 | 
			
		||||
                nullable: true
 | 
			
		||||
| 
						 | 
				
			
			@ -58,7 +58,7 @@ spec:
 | 
			
		|||
                  type: string
 | 
			
		||||
            additionalMembers:
 | 
			
		||||
              type: object
 | 
			
		||||
              description: "Map for teamId and associted additional users"
 | 
			
		||||
              description: "Map for teamId and associated additional users"
 | 
			
		||||
              additionalProperties:
 | 
			
		||||
                type: array
 | 
			
		||||
                nullable: true
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -36,7 +36,7 @@ spec:
 | 
			
		|||
          properties:
 | 
			
		||||
            additionalSuperuserTeams:
 | 
			
		||||
              type: object
 | 
			
		||||
              description: "Map for teamId and associted additional superuser teams"
 | 
			
		||||
              description: "Map for teamId and associated additional superuser teams"
 | 
			
		||||
              additionalProperties:
 | 
			
		||||
                type: array
 | 
			
		||||
                nullable: true
 | 
			
		||||
| 
						 | 
				
			
			@ -45,7 +45,7 @@ spec:
 | 
			
		|||
                  type: string
 | 
			
		||||
            additionalTeams:
 | 
			
		||||
              type: object
 | 
			
		||||
              description: "Map for teamId and associted additional teams"
 | 
			
		||||
              description: "Map for teamId and associated additional teams"
 | 
			
		||||
              additionalProperties:
 | 
			
		||||
                type: array
 | 
			
		||||
                nullable: true
 | 
			
		||||
| 
						 | 
				
			
			@ -54,7 +54,7 @@ spec:
 | 
			
		|||
                  type: string
 | 
			
		||||
            additionalMembers:
 | 
			
		||||
              type: object
 | 
			
		||||
              description: "Map for teamId and associted additional users"
 | 
			
		||||
              description: "Map for teamId and associated additional users"
 | 
			
		||||
              additionalProperties:
 | 
			
		||||
                type: array
 | 
			
		||||
                nullable: true
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1141,7 +1141,7 @@ func (c *Cluster) initHumanUsers() error {
 | 
			
		|||
	for _, superuserTeam := range superuserTeams {
 | 
			
		||||
		err := c.initTeamMembers(superuserTeam, true)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return fmt.Errorf("Cannot create team %q of Postgres superusers: %v", superuserTeam, err)
 | 
			
		||||
			return fmt.Errorf("Cannot initialize members for team %q of Postgres superusers: %v", superuserTeam, err)
 | 
			
		||||
		}
 | 
			
		||||
		if superuserTeam == c.Spec.TeamID {
 | 
			
		||||
			clusterIsOwnedBySuperuserTeam = true
 | 
			
		||||
| 
						 | 
				
			
			@ -1153,7 +1153,7 @@ func (c *Cluster) initHumanUsers() error {
 | 
			
		|||
		if !(util.SliceContains(superuserTeams, additionalTeam)) {
 | 
			
		||||
			err := c.initTeamMembers(additionalTeam, false)
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				return fmt.Errorf("Cannot create additional team %q for cluster owner by %q: %v", additionalTeam, c.Spec.TeamID, err)
 | 
			
		||||
				return fmt.Errorf("Cannot initialize members for additional team %q for cluster owned by %q: %v", additionalTeam, c.Spec.TeamID, err)
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			@ -1165,7 +1165,7 @@ func (c *Cluster) initHumanUsers() error {
 | 
			
		|||
 | 
			
		||||
	err := c.initTeamMembers(c.Spec.TeamID, false)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return fmt.Errorf("Cannot create a team %q of admins owning the PG cluster: %v", c.Spec.TeamID, err)
 | 
			
		||||
		return fmt.Errorf("Cannot initialize members for team %q who owns the Postgres cluster: %v", c.Spec.TeamID, err)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return nil
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -51,6 +51,7 @@ var isEqualIgnoreOrderTest = []struct {
 | 
			
		|||
	{[]string{"a", "b", "c"}, []string{"a", "b", "c"}, true},
 | 
			
		||||
	{[]string{"a", "b", "c"}, []string{"a", "c", "b"}, true},
 | 
			
		||||
	{[]string{"a", "b"}, []string{"a", "c", "b"}, false},
 | 
			
		||||
	{[]string{"a", "b", "c"}, []string{"a", "d", "c"}, true},
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var substractTest = []struct {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue