Skip to content
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

Feat: Added support for multiple project owners #4597

Merged

Conversation

aryan-bhokare
Copy link
Contributor

@aryan-bhokare aryan-bhokare commented Apr 24, 2024

Proposed changes

  1. Added new Route '/projects'.
  2. Added ProjectDashboard.
  3. Modified API's

Types of changes

What types of changes does your code introduce to Litmus? Put an x in the boxes that apply

  • New feature (non-breaking change which adds functionality)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices applies)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc
  • I have signed the commit for DCO to be passed.
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added necessary documentation (if appropriate)

Dependency

Pr #4536

Special notes for your reviewer:

Test Scenarios

  • Project can have multiple project owners so checking RBACs by switching users(owners).
  • Can invite with the owner role.
  • User cannot change his own role to avoid last owner changing his role.
  • User cannot remove invitation of themselves to avoid the last owner to leave.
  • Last project owner leaves.
  • Owner can remove other owners.

aryan-bhokare and others added 29 commits March 17, 2024 12:19
…itmuschaos#4527)

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.18.0 to 0.21.0.
- [Commits](golang/crypto@v0.18.0...v0.21.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.15.5...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/golang/protobuf](https://github.com/golang/protobuf) from 1.5.3 to 1.5.4.
- [Release notes](https://github.com/golang/protobuf/releases)
- [Commits](golang/protobuf@v1.5.3...v1.5.4)

---
updated-dependencies:
- dependency-name: github.com/golang/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raj Das <[email protected]>
This modification unables to send invite with the role as owner.

Signed-off-by: aryan <[email protected]>
This modification checks if the User is the last owner of the project and if not User can leave the project.

Signed-off-by: aryan <[email protected]>
Allows Owner to be able to leave the project.

Signed-off-by: aryan <[email protected]>
This API is used for updating role of the member in the project.

Signed-off-by: aryan <[email protected]>
Owner can delete project with help of this API.

Signed-off-by: aryan <[email protected]>
Signed-off-by: aryan <[email protected]>
Signed-off-by: aryan <[email protected]>
User cannot change role of their own, so that it will avoid edge cases like
1. User is the last owner of the project.
2. User accidentally losing owner access to the projects.

Signed-off-by: aryan <[email protected]>
Signed-off-by: aryan <[email protected]>
* Modified db schema of Owner.

Signed-off-by: aryan <[email protected]>

* Added new API GetProjectOwners.

Signed-off-by: aryan <[email protected]>

* fix: return type error.

Signed-off-by: aryan <[email protected]>

* chore(deps): Bump golang.org/x/crypto in /chaoscenter/authentication (litmuschaos#4527)

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.18.0 to 0.21.0.
- [Commits](golang/crypto@v0.18.0...v0.21.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump follow-redirects in /chaoscenter/web (litmuschaos#4529)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.15.5...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump github.com/golang/protobuf (litmuschaos#4493)

Bumps [github.com/golang/protobuf](https://github.com/golang/protobuf) from 1.5.3 to 1.5.4.
- [Release notes](https://github.com/golang/protobuf/releases)
- [Commits](golang/protobuf@v1.5.3...v1.5.4)

---
updated-dependencies:
- dependency-name: github.com/golang/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raj Das <[email protected]>

* Modified SendInvitation API.

This modification unables to send invite with the role as owner.

Signed-off-by: aryan <[email protected]>

* Modified LeaveProject API.

This modification checks if the User is the last owner of the project and if not User can leave the project.

Signed-off-by: aryan <[email protected]>

* RBAC modification `LeaveProject`.

Allows Owner to be able to leave the project.

Signed-off-by: aryan <[email protected]>

* Added `UpdateMemberRole` API.

This API is used for updating role of the member in the project.

Signed-off-by: aryan <[email protected]>

* Fixed some syntax errors.

Signed-off-by: aryan <[email protected]>

* Updated roles for owner.

Signed-off-by: aryan <[email protected]>

* Added new API `DeleteProject`.
Owner can delete project with help of this API.

Signed-off-by: aryan <[email protected]>

* Added mocks.

Signed-off-by: aryan <[email protected]>

* modified go.sum

Signed-off-by: aryan <[email protected]>

* Added condition `UpdateMemberRole`.

User cannot change role of their own, so that it will avoid edge cases like
1. User is the last owner of the project.
2. User accidentally losing owner access to the projects.

Signed-off-by: aryan <[email protected]>

* made suggested changes.

Signed-off-by: aryan <[email protected]>

* Changed DeleteProject endpoint to have url parameter.

Signed-off-by: aryan <[email protected]>

* Minor fixes.

Signed-off-by: aryan <[email protected]>

---------

Signed-off-by: aryan <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Aryan Bhokare <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raj Das <[email protected]>
Signed-off-by: aryan <[email protected]>
Added a modal CreateProject with it's controller and views.

Signed-off-by: aryan <[email protected]>
@aryan-bhokare
Copy link
Contributor Author

@hrishavjha @SahilKr24 @Saranya-jena PTAL :)

Copy link
Member

@SahilKr24 SahilKr24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing that seems worthy of a change request. General feedback and some optimisations.

Code is clean, precise and less than 128 lines per file. Looks good to me. Great job.

Copy link
Member

@hrishavjha hrishavjha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A Few minor improvements can be made as mentioned in the comments, rest of the changes LGTM 🚀

chaoscenter/authentication/pkg/project/repository.go Outdated Show resolved Hide resolved
chaoscenter/authentication/pkg/project/repository.go Outdated Show resolved Hide resolved
chaoscenter/authentication/pkg/utils/project_utils.go Outdated Show resolved Hide resolved
chaoscenter/authentication/pkg/project/repository.go Outdated Show resolved Hide resolved
Comment on lines +79 to +80
Projects []*Project `json:"projects"`
TotalNumberOfProjects *int64 `json:"totalNumberOfProjects"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both the fields can be made mandatory, since these fields will always be returned in the response. Empty array can be returned in projects in case no projects are found

chaoscenter/authentication/pkg/project/repository.go Outdated Show resolved Hide resolved
chaoscenter/authentication/pkg/project/repository.go Outdated Show resolved Hide resolved
chaoscenter/authentication/pkg/utils/project_utils.go Outdated Show resolved Hide resolved
@aryan-bhokare aryan-bhokare changed the base branch from multiple-owner-support to master July 18, 2024 11:20
@Saranya-jena Saranya-jena merged commit 9d09211 into litmuschaos:master Jul 22, 2024
18 of 19 checks passed
andoriyaprashant pushed a commit to andoriyaprashant/litmus that referenced this pull request Sep 7, 2024
* Modified db schema of Owner.

Signed-off-by: aryan <[email protected]>

* Added new API GetProjectOwners.

Signed-off-by: aryan <[email protected]>

* fix: return type error.

Signed-off-by: aryan <[email protected]>

* chore(deps): Bump golang.org/x/crypto in /chaoscenter/authentication (litmuschaos#4527)

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.18.0 to 0.21.0.
- [Commits](golang/crypto@v0.18.0...v0.21.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump follow-redirects in /chaoscenter/web (litmuschaos#4529)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.15.5...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump github.com/golang/protobuf (litmuschaos#4493)

Bumps [github.com/golang/protobuf](https://github.com/golang/protobuf) from 1.5.3 to 1.5.4.
- [Release notes](https://github.com/golang/protobuf/releases)
- [Commits](golang/protobuf@v1.5.3...v1.5.4)

---
updated-dependencies:
- dependency-name: github.com/golang/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raj Das <[email protected]>

* Modified SendInvitation API.

This modification unables to send invite with the role as owner.

Signed-off-by: aryan <[email protected]>

* Modified LeaveProject API.

This modification checks if the User is the last owner of the project and if not User can leave the project.

Signed-off-by: aryan <[email protected]>

* RBAC modification `LeaveProject`.

Allows Owner to be able to leave the project.

Signed-off-by: aryan <[email protected]>

* Added `UpdateMemberRole` API.

This API is used for updating role of the member in the project.

Signed-off-by: aryan <[email protected]>

* Fixed some syntax errors.

Signed-off-by: aryan <[email protected]>

* Updated roles for owner.

Signed-off-by: aryan <[email protected]>

* Added new API `DeleteProject`.
Owner can delete project with help of this API.

Signed-off-by: aryan <[email protected]>

* Added mocks.

Signed-off-by: aryan <[email protected]>

* modified go.sum

Signed-off-by: aryan <[email protected]>

* Added condition `UpdateMemberRole`.

User cannot change role of their own, so that it will avoid edge cases like
1. User is the last owner of the project.
2. User accidentally losing owner access to the projects.

Signed-off-by: aryan <[email protected]>

* made suggested changes.

Signed-off-by: aryan <[email protected]>

* Changed DeleteProject endpoint to have url parameter.

Signed-off-by: aryan <[email protected]>

* Minor fixes.

Signed-off-by: aryan <[email protected]>

* [WIP] : Multiple project owner backend. (litmuschaos#4536)

* Modified db schema of Owner.

Signed-off-by: aryan <[email protected]>

* Added new API GetProjectOwners.

Signed-off-by: aryan <[email protected]>

* fix: return type error.

Signed-off-by: aryan <[email protected]>

* chore(deps): Bump golang.org/x/crypto in /chaoscenter/authentication (litmuschaos#4527)

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.18.0 to 0.21.0.
- [Commits](golang/crypto@v0.18.0...v0.21.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump follow-redirects in /chaoscenter/web (litmuschaos#4529)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.15.5...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump github.com/golang/protobuf (litmuschaos#4493)

Bumps [github.com/golang/protobuf](https://github.com/golang/protobuf) from 1.5.3 to 1.5.4.
- [Release notes](https://github.com/golang/protobuf/releases)
- [Commits](golang/protobuf@v1.5.3...v1.5.4)

---
updated-dependencies:
- dependency-name: github.com/golang/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raj Das <[email protected]>

* Modified SendInvitation API.

This modification unables to send invite with the role as owner.

Signed-off-by: aryan <[email protected]>

* Modified LeaveProject API.

This modification checks if the User is the last owner of the project and if not User can leave the project.

Signed-off-by: aryan <[email protected]>

* RBAC modification `LeaveProject`.

Allows Owner to be able to leave the project.

Signed-off-by: aryan <[email protected]>

* Added `UpdateMemberRole` API.

This API is used for updating role of the member in the project.

Signed-off-by: aryan <[email protected]>

* Fixed some syntax errors.

Signed-off-by: aryan <[email protected]>

* Updated roles for owner.

Signed-off-by: aryan <[email protected]>

* Added new API `DeleteProject`.
Owner can delete project with help of this API.

Signed-off-by: aryan <[email protected]>

* Added mocks.

Signed-off-by: aryan <[email protected]>

* modified go.sum

Signed-off-by: aryan <[email protected]>

* Added condition `UpdateMemberRole`.

User cannot change role of their own, so that it will avoid edge cases like
1. User is the last owner of the project.
2. User accidentally losing owner access to the projects.

Signed-off-by: aryan <[email protected]>

* made suggested changes.

Signed-off-by: aryan <[email protected]>

* Changed DeleteProject endpoint to have url parameter.

Signed-off-by: aryan <[email protected]>

* Minor fixes.

Signed-off-by: aryan <[email protected]>

---------

Signed-off-by: aryan <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Aryan Bhokare <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raj Das <[email protected]>

* Added new route .

Signed-off-by: aryan <[email protected]>

* Added `CreateProject` modal.

Added a modal CreateProject with it's controller and views.

Signed-off-by: aryan <[email protected]>

* Some changes in `CreateProjectView`.

Signed-off-by: aryan <[email protected]>

* Added `ProjectDashboardCardMenu`.

Signed-off-by: aryan <[email protected]>

* Added `ProjectDashboardCard`.

Signed-off-by: aryan <[email protected]>

* Added `DeleteProject` API mutations.

Signed-off-by: aryan <[email protected]>

* Added `ProjectDashboard`.

Signed-off-by: aryan <[email protected]>

* Added image and strings.

Signed-off-by: aryan <[email protected]>

* Modified `project entities`.

Added new fields in `Project` struct.
Added fields for filters, pagination, and some constants.
Modified `CreateProjectInput`.

Signed-off-by: aryan <[email protected]>

* [Backend] Modification in Backend for the UI.

Added Filters and pagination in Backend.
Modified API's and added a pipeline for the aggregation of results.

Signed-off-by: aryan <[email protected]>

* Added `project_util` for validation of input request.

Signed-off-by: aryan <[email protected]>

* Indent Fixes

Signed-off-by: aryan <[email protected]>

* Modification for Frontend Hook of `CreateProject` API.

Signed-off-by: aryan <[email protected]>

* Modified `ListProject` Query frontend hook.

Signed-off-by: aryan <[email protected]>

* Removed string constants and some minor changes.

Signed-off-by: aryan <[email protected]>

* Added Project Filters.

Signed-off-by: aryan <[email protected]>

* Added pagination and filter subheader in Dashboard.

Signed-off-by: aryan <[email protected]>

* modified auth-api swagger file.

Signed-off-by: aryan <[email protected]>

* Added tags section in create-project modal.

Signed-off-by: aryan <[email protected]>

* Changes due to modification of API and addition of new strings

Signed-off-by: aryan <[email protected]>

* minor changes and resolved some errors.

Signed-off-by: aryan <[email protected]>

* Added routing when clicked on the card.

Signed-off-by: aryan <[email protected]>

* Modifications in backend tests as per API updates.

Signed-off-by: aryan <[email protected]>

* Fix: NoProjects Element and NoFilteredProject Results element.

Signed-off-by: aryan <[email protected]>

* Added scroll for the project list.

Signed-off-by: aryan <[email protected]>

* Some changes in UI w.r.t Multiple Project Owner Feature.

Signed-off-by: aryan <[email protected]>

* Made search text type insensitive.

Signed-off-by: aryan <[email protected]>

* Update chaoscenter/web/src/controllers/ProjectDashboard/ProjectFilters.tsx

Co-authored-by: Hrishav <[email protected]>
Signed-off-by: Aryan Bhokare <[email protected]>

* requested changes.

Signed-off-by: aryan <[email protected]>

* removed unnecessary handle function

Signed-off-by: aryan <[email protected]>

* requested backend changes and small fixes

Signed-off-by: aryan <[email protected]>

* Changed folder structure.

Signed-off-by: aryan <[email protected]>

* requested changes.

Signed-off-by: aryan <[email protected]>

* fixed import orders

Signed-off-by: aryan <[email protected]>

* fixing RoleEditor to RoleExecuter

Signed-off-by: aryan <[email protected]>

* removed redundant deleteprojectinput

Signed-off-by: aryan <[email protected]>

* fixed bug caused in merging

Signed-off-by: aryan <[email protected]>

* fixed bug caused in merging

Signed-off-by: aryan <[email protected]>

* removed duplicate struct

Signed-off-by: aryan <[email protected]>

* Fix: frontend chaoshub test

Signed-off-by: aryan <[email protected]>

* fix: tag rendering issue in project dashboard

Signed-off-by: aryan <[email protected]>

* fix: Less user details in createProject

Signed-off-by: aryan <[email protected]>

* fix: import orders

Signed-off-by: aryan <[email protected]>

---------

Signed-off-by: aryan <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Aryan Bhokare <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raj Das <[email protected]>
Co-authored-by: Hrishav <[email protected]>
Co-authored-by: Saranya Jena <[email protected]>
Signed-off-by: andoriyaprashant <[email protected]>
andoriyaprashant pushed a commit to andoriyaprashant/litmus that referenced this pull request Sep 7, 2024
* Modified db schema of Owner.

Signed-off-by: aryan <[email protected]>

* Added new API GetProjectOwners.

Signed-off-by: aryan <[email protected]>

* fix: return type error.

Signed-off-by: aryan <[email protected]>

* chore(deps): Bump golang.org/x/crypto in /chaoscenter/authentication (litmuschaos#4527)

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.18.0 to 0.21.0.
- [Commits](golang/crypto@v0.18.0...v0.21.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump follow-redirects in /chaoscenter/web (litmuschaos#4529)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.15.5...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump github.com/golang/protobuf (litmuschaos#4493)

Bumps [github.com/golang/protobuf](https://github.com/golang/protobuf) from 1.5.3 to 1.5.4.
- [Release notes](https://github.com/golang/protobuf/releases)
- [Commits](golang/protobuf@v1.5.3...v1.5.4)

---
updated-dependencies:
- dependency-name: github.com/golang/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raj Das <[email protected]>

* Modified SendInvitation API.

This modification unables to send invite with the role as owner.

Signed-off-by: aryan <[email protected]>

* Modified LeaveProject API.

This modification checks if the User is the last owner of the project and if not User can leave the project.

Signed-off-by: aryan <[email protected]>

* RBAC modification `LeaveProject`.

Allows Owner to be able to leave the project.

Signed-off-by: aryan <[email protected]>

* Added `UpdateMemberRole` API.

This API is used for updating role of the member in the project.

Signed-off-by: aryan <[email protected]>

* Fixed some syntax errors.

Signed-off-by: aryan <[email protected]>

* Updated roles for owner.

Signed-off-by: aryan <[email protected]>

* Added new API `DeleteProject`.
Owner can delete project with help of this API.

Signed-off-by: aryan <[email protected]>

* Added mocks.

Signed-off-by: aryan <[email protected]>

* modified go.sum

Signed-off-by: aryan <[email protected]>

* Added condition `UpdateMemberRole`.

User cannot change role of their own, so that it will avoid edge cases like
1. User is the last owner of the project.
2. User accidentally losing owner access to the projects.

Signed-off-by: aryan <[email protected]>

* made suggested changes.

Signed-off-by: aryan <[email protected]>

* Changed DeleteProject endpoint to have url parameter.

Signed-off-by: aryan <[email protected]>

* Minor fixes.

Signed-off-by: aryan <[email protected]>

* [WIP] : Multiple project owner backend. (litmuschaos#4536)

* Modified db schema of Owner.

Signed-off-by: aryan <[email protected]>

* Added new API GetProjectOwners.

Signed-off-by: aryan <[email protected]>

* fix: return type error.

Signed-off-by: aryan <[email protected]>

* chore(deps): Bump golang.org/x/crypto in /chaoscenter/authentication (litmuschaos#4527)

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.18.0 to 0.21.0.
- [Commits](golang/crypto@v0.18.0...v0.21.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump follow-redirects in /chaoscenter/web (litmuschaos#4529)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.15.5...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): Bump github.com/golang/protobuf (litmuschaos#4493)

Bumps [github.com/golang/protobuf](https://github.com/golang/protobuf) from 1.5.3 to 1.5.4.
- [Release notes](https://github.com/golang/protobuf/releases)
- [Commits](golang/protobuf@v1.5.3...v1.5.4)

---
updated-dependencies:
- dependency-name: github.com/golang/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raj Das <[email protected]>

* Modified SendInvitation API.

This modification unables to send invite with the role as owner.

Signed-off-by: aryan <[email protected]>

* Modified LeaveProject API.

This modification checks if the User is the last owner of the project and if not User can leave the project.

Signed-off-by: aryan <[email protected]>

* RBAC modification `LeaveProject`.

Allows Owner to be able to leave the project.

Signed-off-by: aryan <[email protected]>

* Added `UpdateMemberRole` API.

This API is used for updating role of the member in the project.

Signed-off-by: aryan <[email protected]>

* Fixed some syntax errors.

Signed-off-by: aryan <[email protected]>

* Updated roles for owner.

Signed-off-by: aryan <[email protected]>

* Added new API `DeleteProject`.
Owner can delete project with help of this API.

Signed-off-by: aryan <[email protected]>

* Added mocks.

Signed-off-by: aryan <[email protected]>

* modified go.sum

Signed-off-by: aryan <[email protected]>

* Added condition `UpdateMemberRole`.

User cannot change role of their own, so that it will avoid edge cases like
1. User is the last owner of the project.
2. User accidentally losing owner access to the projects.

Signed-off-by: aryan <[email protected]>

* made suggested changes.

Signed-off-by: aryan <[email protected]>

* Changed DeleteProject endpoint to have url parameter.

Signed-off-by: aryan <[email protected]>

* Minor fixes.

Signed-off-by: aryan <[email protected]>

---------

Signed-off-by: aryan <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Aryan Bhokare <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raj Das <[email protected]>

* Added new route .

Signed-off-by: aryan <[email protected]>

* Added `CreateProject` modal.

Added a modal CreateProject with it's controller and views.

Signed-off-by: aryan <[email protected]>

* Some changes in `CreateProjectView`.

Signed-off-by: aryan <[email protected]>

* Added `ProjectDashboardCardMenu`.

Signed-off-by: aryan <[email protected]>

* Added `ProjectDashboardCard`.

Signed-off-by: aryan <[email protected]>

* Added `DeleteProject` API mutations.

Signed-off-by: aryan <[email protected]>

* Added `ProjectDashboard`.

Signed-off-by: aryan <[email protected]>

* Added image and strings.

Signed-off-by: aryan <[email protected]>

* Modified `project entities`.

Added new fields in `Project` struct.
Added fields for filters, pagination, and some constants.
Modified `CreateProjectInput`.

Signed-off-by: aryan <[email protected]>

* [Backend] Modification in Backend for the UI.

Added Filters and pagination in Backend.
Modified API's and added a pipeline for the aggregation of results.

Signed-off-by: aryan <[email protected]>

* Added `project_util` for validation of input request.

Signed-off-by: aryan <[email protected]>

* Indent Fixes

Signed-off-by: aryan <[email protected]>

* Modification for Frontend Hook of `CreateProject` API.

Signed-off-by: aryan <[email protected]>

* Modified `ListProject` Query frontend hook.

Signed-off-by: aryan <[email protected]>

* Removed string constants and some minor changes.

Signed-off-by: aryan <[email protected]>

* Added Project Filters.

Signed-off-by: aryan <[email protected]>

* Added pagination and filter subheader in Dashboard.

Signed-off-by: aryan <[email protected]>

* modified auth-api swagger file.

Signed-off-by: aryan <[email protected]>

* Added tags section in create-project modal.

Signed-off-by: aryan <[email protected]>

* Changes due to modification of API and addition of new strings

Signed-off-by: aryan <[email protected]>

* minor changes and resolved some errors.

Signed-off-by: aryan <[email protected]>

* Added routing when clicked on the card.

Signed-off-by: aryan <[email protected]>

* Modifications in backend tests as per API updates.

Signed-off-by: aryan <[email protected]>

* Fix: NoProjects Element and NoFilteredProject Results element.

Signed-off-by: aryan <[email protected]>

* Added scroll for the project list.

Signed-off-by: aryan <[email protected]>

* Some changes in UI w.r.t Multiple Project Owner Feature.

Signed-off-by: aryan <[email protected]>

* Made search text type insensitive.

Signed-off-by: aryan <[email protected]>

* Update chaoscenter/web/src/controllers/ProjectDashboard/ProjectFilters.tsx

Co-authored-by: Hrishav <[email protected]>
Signed-off-by: Aryan Bhokare <[email protected]>

* requested changes.

Signed-off-by: aryan <[email protected]>

* removed unnecessary handle function

Signed-off-by: aryan <[email protected]>

* requested backend changes and small fixes

Signed-off-by: aryan <[email protected]>

* Changed folder structure.

Signed-off-by: aryan <[email protected]>

* requested changes.

Signed-off-by: aryan <[email protected]>

* fixed import orders

Signed-off-by: aryan <[email protected]>

* fixing RoleEditor to RoleExecuter

Signed-off-by: aryan <[email protected]>

* removed redundant deleteprojectinput

Signed-off-by: aryan <[email protected]>

* fixed bug caused in merging

Signed-off-by: aryan <[email protected]>

* fixed bug caused in merging

Signed-off-by: aryan <[email protected]>

* removed duplicate struct

Signed-off-by: aryan <[email protected]>

* Fix: frontend chaoshub test

Signed-off-by: aryan <[email protected]>

* fix: tag rendering issue in project dashboard

Signed-off-by: aryan <[email protected]>

* fix: Less user details in createProject

Signed-off-by: aryan <[email protected]>

* fix: import orders

Signed-off-by: aryan <[email protected]>

---------

Signed-off-by: aryan <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Aryan Bhokare <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raj Das <[email protected]>
Co-authored-by: Hrishav <[email protected]>
Co-authored-by: Saranya Jena <[email protected]>
Signed-off-by: andoriyaprashant <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants