-
Notifications
You must be signed in to change notification settings - Fork 80
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
NSFS | NC | CLI | Account add/update when uid = 0 and gid != 0 bug fix #7788
Conversation
@romayalon please notice there is a similar issue that is not covered by this fix: {
"error": {
"code": "InvalidAccountNSFSConfig",
"message": "Account config should not be empty, should contain UID, GID or user",
"detail": {
"distinguished_name": 0
}
}
} |
42f88d7
to
72fa722
Compare
@shirady As discussed on Slack - this is a different type of issue that will addressed by replacing the STRING_OR_NUMBER type with string only.
|
72fa722
to
a5cead5
Compare
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.
You can leave the comment unhandled and mentioned it as a GAP (the fix is more important)
@@ -876,7 +876,7 @@ function validate_options_type(input_options_with_data) { | |||
/// UTILS /// | |||
/////////////////////////////// | |||
|
|||
function is_undefined(value) { | |||
function is_string_undefined(value) { |
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.
If it will not be temporary as we want (as mentioned in the comment) I would consider these points:
- If you can add a JSDoc to the function.
- I prefer functions with verbs and change the variable name to indicate that it should only be used for names., for example:
function is_string_undefined(value) { | |
function check_string_undefined(str) { |
- Edge case - what will be when someone uses a bucket or an account with the name 0? (it still can happen, unlike a user with 0 that will be removed).
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.
bucket and account are SensitiveStrings and on SensitiveString we check str.unwrap() === 'undefined'
Signed-off-by: Romy <35330373+romayalon@users.noreply.github.com>
a5cead5
to
c1dcafa
Compare
Explain the changes
Issues: Fixed #xxx / Gap #xxx
Testing Instructions:
manage_nsfs.js account add --name foo --email foo@example.com --uid 0 --gid 10 2>/dev/null