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

Hide private teams on organisation detail view for users without manage permission #5724

Merged
merged 4 commits into from May 2, 2023

Conversation

Aadesh-Baral
Copy link
Contributor

@Aadesh-Baral Aadesh-Baral commented Apr 21, 2023

closes #5723

What to test?

Private teams should be hidden on the organization detail page if any of the following conditions are met:

  • User is not logged in.
  • User does not have the permission to manage the organization.

Private teams should be displayed on the organization detail page if any of the following conditions are met:

  • User has organisation manage permission
  • User has system admin role

Public teams should be visible under all circumstances.

… manager.

-------------------------
Add a condition to filter out teams based on visibility on the function to return organization dto,
such that private projects are only returned for users with organisation manage permissions.
---------------------------
The test code for the get_organisation_stats function passed the year parameter as "None" in the test case.
A code scanning alert was raised because the year argument expects an integer in this method.
@Aadesh-Baral Aadesh-Baral marked this pull request as ready for review April 21, 2023 08:32
@sonarcloud
Copy link

sonarcloud bot commented Apr 21, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@ramyaragupathy ramyaragupathy left a comment

Choose a reason for hiding this comment

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

@d-rita and I reviewed the functionality. It works as expected. @d-rita will test rest of the workflows and the code quality.

Copy link
Contributor

@d-rita d-rita left a comment

Choose a reason for hiding this comment

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

This works as expected and the tests cover different cases. LGTM

@Aadesh-Baral Aadesh-Baral merged commit bccf821 into develop May 2, 2023
5 checks passed
@Aadesh-Baral Aadesh-Baral deleted the fix/5723-private-teams-visibility branch May 2, 2023 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Private team visibility update
3 participants