Skip to content

Approval bypass v2 oss #6510

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

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from
Open

Approval bypass v2 oss #6510

wants to merge 21 commits into from

Conversation

prakash100198
Copy link
Contributor

Description

Fixes #

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit/api test cases.

Does this PR introduce a user-facing change?


IsUserSuperAdmin: isSuperAdmin,
UserId: userId,
}
response := handler.bulkUpdateService.BulkUpdate(script.Spec, userMetadata)
Copy link
Member

Choose a reason for hiding this comment

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

can set userMetaData in spec?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we do that? , since userMetadata is not related to bulkUpdatePayload and for checking if a user is exception or not (i.e is allowed to perform action bulk) this userMetadata is a must, and in this way a function expectations will be set that userMetadata is required , so that in future if someone uses this they will pass userMetadata (if that is set in bulk payload then that can be missed )

UserId: request.UserId,
}

response, err := handler.bulkUpdateService.BulkHibernate(r.Context(), request, token, handler.checkAuthForBulkHibernateAndUnhibernate, userMetadata)
Copy link
Member

Choose a reason for hiding this comment

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

lets not pass token here, and get token inside through context

IsUserSuperAdmin: isSuperAdmin,
UserId: request.UserId,
}
response, err := handler.bulkUpdateService.BulkUnHibernate(r.Context(), request, token, handler.checkAuthForBulkHibernateAndUnhibernate, userMetadata)
Copy link
Member

Choose a reason for hiding this comment

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

same as before

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
8.9% Duplication on New Code (required ≤ 3%)
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

2 participants