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

inaccessibility ordinary users #55

Closed
majidkarimizadeh opened this issue Jan 23, 2017 · 1 comment
Closed

inaccessibility ordinary users #55

majidkarimizadeh opened this issue Jan 23, 2017 · 1 comment

Comments

@majidkarimizadeh
Copy link

majidkarimizadeh commented Jan 23, 2017

hi...
i want to prevent ordinary users to get to admin panel...
like redirect them or showing 404 error or...
what should i have done?
thanks

@jinzhu
Copy link
Contributor

jinzhu commented Jan 23, 2017

Refer https://github.com/qor/qor-example/blob/master/config/auth/admin_auth.go

Return nil in the GetCurrentUser

And set it to Admin, like

https://github.com/qor/qor-example/blob/master/config/admin/admin.go#L45

@jinzhu jinzhu closed this as completed Jan 23, 2017
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

No branches or pull requests

2 participants