-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Associate project for every organisation fetched #6518
Conversation
a |
* Script added for table 'users' Signed-off-by: root <[email protected]> * updated down script Signed-off-by: root <[email protected]> * updated up script Signed-off-by: root <[email protected]> * updated up script Signed-off-by: root <[email protected]>
Signed-off-by: Abdul-Az <[email protected]>
…hen doing builds (#5741) Signed-off-by: Rick Marry <[email protected]>
Signed-off-by: root <[email protected]>
Signed-off-by: Abdul-Az <[email protected]>
* Storage functions added for users table Signed-off-by: root <[email protected]> * Updated with review comments Signed-off-by: root <[email protected]>
* converted server modal into slider Signed-off-by: chaitali-mane <[email protected]> * Updated test cases Signed-off-by: chaitali-mane <[email protected]>
Signed-off-by: Abdul-Az <[email protected]>
Signed-off-by: Abdul-Az <[email protected]>
Signed-off-by: Abdul-Az <[email protected]>
* converted server modal into slider Signed-off-by: chaitali-mane <[email protected]> * Updated test cases Signed-off-by: chaitali-mane <[email protected]>
Signed-off-by: Abdul-Az <[email protected]>
Signed-off-by: Abdul-Az <[email protected]>
* added some changes for the create server slider Signed-off-by: Vinay Sharma <[email protected]> * added some minor changes Signed-off-by: Vinay Sharma <[email protected]>
Signed-off-by: Abdul-Az <[email protected]>
Signed-off-by: Abdul-Az <[email protected]>
Signed-off-by: Abdul-Az <[email protected]>
Signed-off-by: root <[email protected]>
* Added Users tab UI Signed-off-by: chaitali-mane <[email protected]> * Added enitites api integration Signed-off-by: chaitali-mane <[email protected]> * minor changes Signed-off-by: chaitali-mane <[email protected]> * Updated minor change Signed-off-by: chaitali-mane <[email protected]>
Signed-off-by: Himanshi Chhabra <[email protected]>
* Shell script added to add the sample infra server users Signed-off-by: root <[email protected]> * Minor changes added Signed-off-by: root <[email protected]>
Signed-off-by: Kallol Roy <[email protected]>
* Script added for migration tables Signed-off-by: sonali wale <[email protected]> * Insert scripts added for migration type and status Signed-off-by: sonali wale <[email protected]> * Server id column added in migration table Signed-off-by: sonali wale <[email protected]> * Index added on server_id column in migration table Signed-off-by: sonali wale <[email protected]>
30b5842
to
eca1a1b
Compare
cd7e20d
to
9a824de
Compare
* editor actions added Signed-off-by: Abdul-Az <[email protected]> * infra_editor test cases Signed-off-by: Abdul-Az <[email protected]> * test cases fix Signed-off-by: Abdul-Az <[email protected]> * infra editor actions update Signed-off-by: Abdul-Az <[email protected]> * editor role fix Signed-off-by: Abdul-Az <[email protected]> * test cases fix Signed-off-by: Abdul-Az <[email protected]>
* project owner wip Signed-off-by: Abdul-Az <[email protected]> * project owner actions Signed-off-by: Abdul-Az <[email protected]> * fix Signed-off-by: Abdul-Az <[email protected]> * doc update Signed-off-by: Abdul-Az <[email protected]> * pipeline fix Signed-off-by: Abdul-Az <[email protected]>
aae78b2
to
5e42414
Compare
@@ -97,7 +99,8 @@ func serve(cmd *cobra.Command, args []string) { | |||
// get secrets client | |||
secretsClient := secrets.NewSecretsServiceClient(secretsConn) | |||
|
|||
service, err := service.Start(l, migrationConfig, connFactory, secretsClient, authzClient) | |||
service, err := service.Start(l, migrationConfig, connFactory, secretsClient, authzClient, authzClientProject) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
authzProjectClient
can be a better name of the variable?
service, err := service.Start(l, migrationConfig, connFactory, secretsClient, authzClient, authzClientProject) | |
service, err := service.Start(l, migrationConfig, connFactory, secretsClient, authzClient, authzProjectClient) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to the suggested name
@@ -240,7 +241,11 @@ func (s *Server) GetInfraServerOrgs(ctx context.Context, req *request.GetInfraSe | |||
// Save organisations in backend DB | |||
orgs := []storage.Org{} | |||
for key := range orgsList { | |||
org, err := s.service.Storage.StoreOrg(ctx, key, key, "", "", req.ServerId, nil) | |||
projects, err := createProjectFromOrgIdAndServerID(s, ctx, req.ServerId, key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it create the policies too for the project?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we are passing skip policies as false, therefore its creating project with all the policies.
1f951be
to
7b075a7
Compare
Signed-off-by: Yashvi Jain <[email protected]>
Signed-off-by: Yashvi Jain <[email protected]>
Signed-off-by: Yashvi Jain <[email protected]>
5e42414
to
2737de0
Compare
Signed-off-by: Yashvi Jain <[email protected]>
Signed-off-by: Yashvi Jain <[email protected]>
Kudos, SonarCloud Quality Gate passed! |
🔩 Description: What code changed, and why?
When a organisation is migrated from the chef server to automate, an IAM project needs to be linked with it.
So added the call to project create service to create the project with the name of serverId_orgID, every time the organisation is stored in the database the project is created with the name having all the policies as editors, viewer, owner.
⛓️ Related Resources
👍 Definition of Done
Project is created and stored in database at the time of migration
👟 How to Build and Test the Change
Steps to build:
Steps to test:
start_chef_server
Request
This is a get request.
curl -sSkH "api-token: $(get_admin_token)" 'https://a2-dev.test/api/v0/infra/servers/SERVER_ID/infraserverorgs'
Response
✅ Checklist
All PRs must tick these:
With occasional exceptions, all PRs from Progress employees must tick these:
make spell
in any component directory)All PRs from Progress employees should tick these if appropriate:
Please add a note next to any checkbox above if you are NOT ticking it.
📷 Screenshots, if applicable