[web] Add isModeratedSession flag to web ssh session#24238
Merged
Conversation
russjones
reviewed
Apr 7, 2023
| // Owner is the name of the session owner, ie the one who created the session. | ||
| Owner string `json:"owner"` | ||
| // IsModeratedSession is true if the session requires moderation. | ||
| IsModeratedSession bool `json:"isModeratedSession"` |
Contributor
There was a problem hiding this comment.
Minor: everything else in this structure is using underscores, why is this camel case?
Contributor
Author
There was a problem hiding this comment.
Was using my frontend brain when I did this part. Thanks for the catch
zmb3
reviewed
Apr 7, 2023
| // Owner is the name of the session owner, ie the one who created the session. | ||
| Owner string `json:"owner"` | ||
| // IsModeratedSession is true if the session requires moderation. | ||
| IsModeratedSession bool `json:"is_moderated_session"` |
Collaborator
There was a problem hiding this comment.
Consider calling this Moderated instead?
if session.Moderated reads better IMO than if session.IsModeratedSession.
Contributor
Author
There was a problem hiding this comment.
I can get behind that. and that removes any "camelcase vs snakecase" argument too, why not
ibeckermayer
approved these changes
Apr 10, 2023
Merged
zmb3
approved these changes
Apr 12, 2023
avatus
added a commit
that referenced
this pull request
Apr 19, 2023
* Add isModeratedSession flag to web ssh session * Fix lint * Change to snakecase * Change to moderated
avatus
added a commit
that referenced
this pull request
Apr 19, 2023
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of: #23546
This adds the
isModeratedSessionflag to new/fetched sessions in the web UI so we can make logic decisions around it (like starting a File Transfer Request).I decided to name the flag
isModeratedSessionrather thanisModeratedbecause, to me,isModeratedsounds like its currently being moderated but, I won't die on that hill and I'm fine to keep it in line with the access evaluator name.