Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2361)

Issue 7226056: state: add user support

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 3 months ago by rog
Modified:
11 years, 3 months ago
Reviewers:
mp+145443
Visibility:
Public.

Description

state: add user support As agreed, we're not implementing removal of users at this time. https://code.launchpad.net/~rogpeppe/juju-core/206-state-entity/+merge/145443 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : state: add user support #

Total comments: 8

Patch Set 3 : state: add user support #

Unified diffs Side-by-side diffs Delta from patch set Stats (+201 lines, -8 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M state/machine.go View 1 chunk +1 line, -1 line 0 comments Download
M state/machine_test.go View 1 chunk +1 line, -1 line 0 comments Download
M state/open.go View 1 2 chunks +2 lines, -1 line 0 comments Download
M state/state.go View 1 2 2 chunks +27 lines, -0 lines 0 comments Download
M state/state_test.go View 2 chunks +6 lines, -4 lines 0 comments Download
M state/unit_test.go View 1 chunk +1 line, -1 line 0 comments Download
A state/user.go View 1 1 chunk +112 lines, -0 lines 0 comments Download
A state/user_test.go View 1 chunk +49 lines, -0 lines 0 comments Download

Messages

Total messages: 5
rog
Please take a look.
11 years, 3 months ago (2013-01-29 17:29:34 UTC) #1
dimitern
LGTM, one question. https://codereview.appspot.com/7226056/diff/2001/state/user.go File state/user.go (right): https://codereview.appspot.com/7226056/diff/2001/state/user.go#newcode11 state/user.go:11: var validUser = regexp.MustCompile("^[a-zA-Z][a-zA-Z0-9]*$") How about ...
11 years, 3 months ago (2013-01-30 06:47:22 UTC) #2
TheMue
LGTM, only three comments. https://codereview.appspot.com/7226056/diff/2001/state/state.go File state/state.go (right): https://codereview.appspot.com/7226056/diff/2001/state/state.go#newcode253 state/state.go:253: // Entity represents an entity ...
11 years, 3 months ago (2013-01-30 15:51:52 UTC) #3
fwereade
LGTM on the understanding that the PasswordHash never actually goes down to a client. https://codereview.appspot.com/7226056/diff/2001/state/user.go ...
11 years, 3 months ago (2013-01-31 13:08:56 UTC) #4
rog
11 years, 3 months ago (2013-01-31 18:06:51 UTC) #5
*** Submitted:

state: add user support

As agreed, we're not implementing removal
of users at this time.

R=dimitern, TheMue, fwereade
CC=
https://codereview.appspot.com/7226056

https://codereview.appspot.com/7226056/diff/2001/state/state.go
File state/state.go (right):

https://codereview.appspot.com/7226056/diff/2001/state/state.go#newcode253
state/state.go:253: // Entity represents an entity that has
On 2013/01/30 15:51:52, TheMue wrote:
> s/Entity/AuthEntity/

Done.

https://codereview.appspot.com/7226056/diff/2001/state/user.go
File state/user.go (right):

https://codereview.appspot.com/7226056/diff/2001/state/user.go#newcode11
state/user.go:11: var validUser = regexp.MustCompile("^[a-zA-Z][a-zA-Z0-9]*$")
On 2013/01/30 15:51:52, TheMue wrote:
> On 2013/01/30 06:47:22, dimitern wrote:
> > How about enforcing some minimum length for passwords, like 8 chars?
> 
> Not sure about a pw validation here in state. Often they restrict in bad way
> (e.g. length limitation or usage or special characters).

+1
if we want password validation, the right place is somewhere user facing.

https://codereview.appspot.com/7226056/diff/2001/state/user.go#newcode43
state/user.go:43: func (st *State) getUser(name string, udoc *userDoc) error {
On 2013/01/31 13:08:56, fwereade wrote:
> On 2013/01/30 15:51:52, TheMue wrote:
> > Would like to drop the get-prefix, as  we have almost no methods with it.
> 
> We have relatively few methods that would require it, though -- I'm +1 on
> getUser

thanks. i think getUser is as good as readUser which is what i'd use otherwise.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b