-
Notifications
You must be signed in to change notification settings - Fork 881
feat: expose owner_name
in coder_workspace
resource
#11639
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
6653b24
Update go.mod
mtojek 2b239ab
Proto changes
mtojek 7fd0577
WIP
mtojek 2defb89
make gen
mtojek 06208e5
Fix TODO
mtojek e0d8551
UpdateUserProfile name
mtojek e3565e6
Patching frontend
mtojek e6c23aa
name not confidential
mtojek 7df71de
find and replace
mtojek afced2a
Fix golden
mtojek 8e6f929
Fix ts
mtojek 97dfbcf
Merge branch 'main' into 9883-add-owner-to-workspace
mtojek 4d8934d
bad linting
mtojek 15367f0
Unit test
mtojek 891705f
Validate real name
mtojek f3c0c42
Fix
mtojek d116566
Address PR comments
mtojek 2bc609e
Fix strings.TrimSpace
mtojek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Address PR comments
- Loading branch information
commit d1165664a1a7fce9990db1c44d054971e15c109c
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -224,6 +224,10 @@ func TestUserRealNameValid(t *testing.T) { | |
{"Mr Bean", true}, | ||
{"Severus Snape", true}, | ||
{"Prof. Albus Percival Wulfric Brian Dumbledore", true}, | ||
{"Pablo Diego José Francisco de Paula Juan Nepomuceno María de los Remedios Cipriano de la Santísima Trinidad Ruiz y Picasso", true}, | ||
{"Hector Ó hEochagáin", true}, | ||
{"Małgorzata Kalinowska-Iszkowska", true}, | ||
{"成龍", true}, | ||
{". .", true}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like a smiley, I approve! 👀 |
||
|
||
{"Lord Voldemort ", false}, | ||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the motivation for this limit? Hubert will be sad: https://www.guinnessworldrecords.com/world-records/67285-longest-personal-name
I think it's unlikely we'll hit this, but arbitrary limits have a way of making people sad (think email regex). We should at least document this decision a bit better. Should length also be enforced in the DB side?
PS. If we're thinking about frontend, they could always use ellipse over there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect we don't want to allow someone to fill up the database with a name that's gigabytes in size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I understand that risk could be a concern, I was specifically thinking about this limit (128), though. Seems on the smaller to just be a safety-net. And if we're really worried about this case, I do think database limits would be a good idea, otherwise we'll always run the risk of introducing new holes. And I'd be surprised if we didn't have some gaps in this defense elsewhere currently as well 😄.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The form Mr. Hubert used, HUBERT BLAINE WOLFESCHLEGELSTEINHAUSENBERGERDORFF SR, is within the limit!
The original use case for this feature is to populate all places where UI or CLI can render it, like Git commiter/message. I'm sure that Hubert Blain Wolf... will crash UIs in many different places, so I would stick to the artificial limit.
Anyway, we can always disable the limit. The other way round might be hard to do as we might need to chop some names...
This is valid risk, and I wouldn't like to enable another gate to pump bytes into the database.