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

Return username on POST to /_session #16

Merged
merged 1 commit into from Dec 25, 2014

Conversation

Projects
None yet
5 participants
@robertkowalski
Contributor

robertkowalski commented Nov 23, 2014

When logging in with admin credentials and no user doc is
present, the name was null. Example:

{"ok":true,"name":null,"roles":["_admin"]}

closes COUCHDB-1356

-include_lib("couch/include/couch_eunit.hrl").
-define(TIMEOUT, 1000).

This comment has been minimized.

@kxepal

kxepal Nov 23, 2014

Member

You seems not using this define anywhere in test module...

setup() ->
Addr = config:get("httpd", "bind_address", "127.0.0.1"),
Port = integer_to_list(mochiweb_socket_server:get(couch_httpd, port)),

This comment has been minimized.

@kxepal

kxepal Nov 23, 2014

Member

This wouldn't work for R14 releases. Sorry, mess it with integer_to_binary.

@robertkowalski robertkowalski force-pushed the robertkowalski:COUCHDB-1356-auth-session branch from e109ff8 to bcaace2 Nov 23, 2014

@srsgores

This comment has been minimized.

srsgores commented Dec 14, 2014

+1 for this. Just had this happen to me.

@kxepal

This comment has been minimized.

Member

kxepal commented Dec 16, 2014

+1

@robertkowalski robertkowalski force-pushed the robertkowalski:COUCHDB-1356-auth-session branch 2 times, most recently from a9a2a52 to f6a34da Dec 25, 2014

Return username on POST to /_session
When logging in with admin credentials and no user doc is
present, the name was `null`. Example:

`{"ok":true,"name":null,"roles":["_admin"]}`

closes COUCHDB-1356

@asfgit asfgit merged commit f6a34da into apache:master Dec 25, 2014

@robertkowalski robertkowalski deleted the robertkowalski:COUCHDB-1356-auth-session branch Dec 25, 2014

@robertkowalski

This comment has been minimized.

Contributor

robertkowalski commented Dec 25, 2014

merged as f6a34da! happy holidays everyone!

@alanning

This comment has been minimized.

alanning commented on f6a34da Jul 31, 2015

Just worked through your wonderful article and I think the name of the test function is perhaps inverted?

I think the name should be, "should_return_username_on_post_to_session", since it is asserting that the username is returned when posting to session.

Just a small typo, I could submit a PR but I'm not sure what the policy is on submitting one against an already-closed ticket? Probably not worth opening a new issue for. You may want to update the test function name in your article though.

This comment has been minimized.

Owner

robertkowalski replied Jul 31, 2015

Hi @alanning, good spot!

I am glad you liked the article!

Feel free to just send a PR (without mentioning a ticket #) to https://github.com/apache/couchdb-couch - happy hacking! :)

This comment has been minimized.

alanning replied Aug 1, 2015

PR submitted. Thanks!

janl pushed a commit to janl/couchdb-couch that referenced this pull request Nov 28, 2015

Merge remote-tracking branch 'iilyak/1145-_local_docs-handler'
Conflicts:
	src/chttpd_db.erl

This closes apache#16

COUCHDB-1145

jlami added a commit to martinic/ember-simple-auth-pouch that referenced this pull request Sep 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment