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

signup page forward to not found page after signup and logout #46

Open
nak3 opened this issue May 10, 2016 · 4 comments
Open

signup page forward to not found page after signup and logout #46

nak3 opened this issue May 10, 2016 · 4 comments
Labels

Comments

@nak3
Copy link
Collaborator

nak3 commented May 10, 2016

Please see reproduce steps:

step-1. current version
$ git log --oneline -p -1
601a49d Merge pull request #22 from dinever/admin_ui
step-2. Start dingo
go run main.go
step-3. Access and signup Dingo

http://localhost:8000/signup/

step-4. Logout
step-5. Go to sign up page

It returns not found page. (Even from http://localhost:8000/login to push SIGN UP, it shows not found page.)

@nak3 nak3 changed the title signup page forward to not found page after signup signup page forward to not found page after signup and logout May 10, 2016
@dinever
Copy link
Collaborator

dinever commented May 10, 2016

Thanks for the feedback! @nak3

This is actually an intended behavior. The signup page won't work if there is already a registered user.

The related code can be found here: app/handler/auth.go#L34

The reason behind this is that we don't want other people to sign up the site and have control of the content.

Maybe we can add a feature in the future to allow the admin user to send invitation link to other people for them to sign up and add content to the site, and add a role-based permission system(e.g. a user can be admin or writer).

@nak3
Copy link
Collaborator Author

nak3 commented May 10, 2016

Hi @dinever Thank you for your explanation. I understand it. So, we should have one feature and one fix.

In terms of feature, as you explained, it will be nice to have the feature to send an invitation by admin user. Otherwise I feel we can have admin page which have a button to Add User with role managment.

Then, as for a fix, Login page should not show the sign up button if there is already a registered user.

@nak3
Copy link
Collaborator Author

nak3 commented May 10, 2016

In any case, please feel free to close this report, if you would like. Or if you would like to track the feature/fix, I'm alright to leave this open.

@dinever dinever added the bug label May 19, 2016
@TimothyYe
Copy link
Contributor

TimothyYe commented May 21, 2016

I also reproduced this issue and saw there was an 500 internal server error:

Sorry, the requested URL caused an error:
template: 404.html:44: function "DateInt64" not defined

I agree with @nak3 , if there is already a registered user, we'd better hide that "sign up" button.

TimothyYe added a commit to TimothyYe/dingo that referenced this issue May 24, 2016
TimothyYe added a commit to TimothyYe/dingo that referenced this issue May 24, 2016
dinever added a commit that referenced this issue May 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants