Skip to content
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

add validation for users #207

Merged
merged 2 commits into from
May 18, 2016
Merged

add validation for users #207

merged 2 commits into from
May 18, 2016

Conversation

PengTian0
Copy link
Contributor

@PengTian0 PengTian0 commented May 17, 2016

validate the input users date. user date should meet the following requirements:

  1. user name and password is required;
  2. user name should consist of at least a character or number;
  3. the length of password should larger than 4.
  4. sshKey and uid is optional;
  5. if the uid is given, it should between 500 and 65535 (>=500, <=65535)
    http://askubuntu.com/questions/137126/how-are-the-values-of-uid-generated

@yyscamper @iceiilin @panpan0000

if(user.sshKey){
expect(user.sshKey).to.be.a('string');
}
})

Choose a reason for hiding this comment

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

Missing semicolon.

@JenkinsRHD
Copy link
Contributor

@RackHD/corecommitters please review.

@PengTian0
Copy link
Contributor Author

test this please

@PengTian0
Copy link
Contributor Author

jenkins: test this please

.to.throw('username must be a string');
});

it('should throw error when username is not valid', function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

This description is same with line#290, it's better to change to a different one.

@yyscamper
Copy link
Contributor

@PengTian0 : This link (http://vbird.dic.ksu.edu.tw/linux_basic/fedora_4/0410accountmanager-fc4.php#account_id) is in Chinese, you'd better use a link in English, so every reviewer can understand.

@iceiilin
Copy link
Member

+1

@yyscamper
Copy link
Contributor

👍

@jlongever, seems @PengTian0 should also be added into the whitelist, so that the Jenkins will work.
@PengTian0 is one of the Maglev new hire.

@jlongever
Copy link
Contributor

@yyscamper
Copy link
Contributor

@jlongever , I definitely forgot this. OK, thanks. I can handle it by myself.

@panpan0000
Copy link
Contributor

+1

@PengTian0
Copy link
Contributor Author

@yyscamper
Copy link
Contributor

Jenkins, ok to test

@yyscamper yyscamper merged commit 177f5f0 into RackHD:master May 18, 2016
kellylu2sym pushed a commit to kellylu2sym/on-tasks that referenced this pull request Aug 8, 2017
update publishGraphFinished parameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants