-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 'promoted' access request state (#31346)
* This change introduces a new 'promoted' access request state. The state represents that an access request has been promoted to an access list. Affected code was modified to adjust to the new promoted state and ensure correct system's behavior. Added a new 'GetAccessRequest' method for internal use to retrieve access request info. Disallowed direct promotion of access requests. Introduced 'SubmitAccessReviewAllowPromotion' for promotions. Added 'PromoteAccessRequest' method and updated its usage to restrict direct promotions. Refactored code for better readability and testing. Renamed some functions, simplified logic, added test helpers. Introduced 'promoted' state for access requests to handle promotion workflow. Added 'PromotedAccessListTitle' in 'AccessReview' to track promotion state. * Refactor function and message names for better clarity The function and message names related to the promotion of an access request to an access list were restructured for better readability and consistency. Names like 'PromoteAccessReqResponse' have been replaced with more descriptive names such as 'PromoteAccessRequestResponse'. This increases clarity and consistency across the project. * Remove the hacky GRPC server implementation * Change method names to be more descriptive Renamed all instances of 'PromoteAccessRequest' to 'AccessRequestPromote' in multiple files. The new method name provides a more descriptive and clear understanding of the method's function, which improves code readability and maintenance. This change applies to method definitions, comments, and error messages. * Refine error message and introduce IsPromoted method Refined the error message in 'access_request.go' to better indicate that only promoted requests can set the promoted access list title, not just have one. This enhances clarity of error message. Additionally, introduced 'IsPromoted' method in 'access_request.go' file. This method will be useful for quickly checking if a request is in the PROMOTED state. * Rename variable in SubmitAccessReview method Renamed the variable "params" to "submission" in the 'SubmitAccessReview' function, in 'auth_with_roles.go' file. The name "submission" provides clearer indictation of its role in submitting access review. This enhances code readability and understandability. No logic changes were made during this update.
- Loading branch information
Showing
26 changed files
with
3,180 additions
and
2,604 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
774 changes: 473 additions & 301 deletions
774
api/gen/proto/go/teleport/accesslist/v1/accesslist_service.pb.go
Large diffs are not rendered by default.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
api/gen/proto/go/teleport/accesslist/v1/accesslist_service_grpc.pb.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.