-
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 <swale@msystechnologies.com> * updated down script Signed-off-by: root <swale@msystechnologies.com> * updated up script Signed-off-by: root <swale@msystechnologies.com> * updated up script Signed-off-by: root <swale@msystechnologies.com>
Signed-off-by: Abdul-Az <aazeez@progress.com>
…hen doing builds (#5741) Signed-off-by: Rick Marry <rmarry@chef.io>
Signed-off-by: root <swale@msystechnologies.com>
Signed-off-by: Abdul-Az <aazeez@progress.com>
* Storage functions added for users table Signed-off-by: root <swale@msystechnologies.com> * Updated with review comments Signed-off-by: root <swale@msystechnologies.com>
* converted server modal into slider Signed-off-by: chaitali-mane <cmane@progress.com> * Updated test cases Signed-off-by: chaitali-mane <cmane@progress.com>
Signed-off-by: Abdul-Az <aazeez@progress.com>
Signed-off-by: Abdul-Az <aazeez@progress.com>
Signed-off-by: Abdul-Az <aazeez@progress.com>
* converted server modal into slider Signed-off-by: chaitali-mane <cmane@progress.com> * Updated test cases Signed-off-by: chaitali-mane <cmane@progress.com>
Signed-off-by: Abdul-Az <aazeez@progress.com>
Signed-off-by: Abdul-Az <aazeez@progress.com>
* added some changes for the create server slider Signed-off-by: Vinay Sharma <vsharma@chef.io> * added some minor changes Signed-off-by: Vinay Sharma <vsharma@chef.io>
Signed-off-by: Abdul-Az <aazeez@progress.com>
Signed-off-by: Abdul-Az <aazeez@progress.com>
Signed-off-by: Abdul-Az <aazeez@progress.com>
Signed-off-by: root <swale@msystechnologies.com>
* Added Users tab UI Signed-off-by: chaitali-mane <cmane@progress.com> * Added enitites api integration Signed-off-by: chaitali-mane <cmane@progress.com> * minor changes Signed-off-by: chaitali-mane <cmane@progress.com> * Updated minor change Signed-off-by: chaitali-mane <cmane@progress.com>
Signed-off-by: Himanshi Chhabra <hchhabra@progress.com>
* Shell script added to add the sample infra server users Signed-off-by: root <swale@msystechnologies.com> * Minor changes added Signed-off-by: root <swale@msystechnologies.com>
Signed-off-by: Kallol Roy <karoy@progress.com>
* Script added for migration tables Signed-off-by: sonali wale <sonali.wale@progress.com> * Insert scripts added for migration type and status Signed-off-by: sonali wale <sonali.wale@progress.com> * Server id column added in migration table Signed-off-by: sonali wale <sonali.wale@progress.com> * Index added on server_id column in migration table Signed-off-by: sonali wale <sonali.wale@progress.com>
30b5842
to
eca1a1b
Compare
cd7e20d
to
9a824de
Compare
* editor actions added Signed-off-by: Abdul-Az <aazeez@progress.com> * infra_editor test cases Signed-off-by: Abdul-Az <aazeez@progress.com> * test cases fix Signed-off-by: Abdul-Az <aazeez@progress.com> * infra editor actions update Signed-off-by: Abdul-Az <aazeez@progress.com> * editor role fix Signed-off-by: Abdul-Az <aazeez@progress.com> * test cases fix Signed-off-by: Abdul-Az <aazeez@progress.com>
* project owner wip Signed-off-by: Abdul-Az <aazeez@progress.com> * project owner actions Signed-off-by: Abdul-Az <aazeez@progress.com> * fix Signed-off-by: Abdul-Az <aazeez@progress.com> * doc update Signed-off-by: Abdul-Az <aazeez@progress.com> * pipeline fix Signed-off-by: Abdul-Az <aazeez@progress.com>
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 <Yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <Yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <Yashvi.jain@progress.com>
5e42414
to
2737de0
Compare
Signed-off-by: Yashvi Jain <Yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <Yashvi.jain@progress.com>
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