rawnet / rawnet-admin

An inheritable admin interface for Ruby on Rails apps
MIT License
0 stars 2 forks source link

Unify user methods #9

Closed tombeynon closed 9 years ago

tombeynon commented 9 years ago

The current default config sets the following..

config.user_method = :current_user
config.authenticate_method = :authenticate_admin!

We should probably unify the noun. Given that it's RawnetAdmin and not RawnetUser, shall we go with admin?

config.user_method = :current_admin
config.authenticate_method = :authenticate_admin!
vertism commented 9 years ago

Maybe go with user? You could have instances where there are different levels of access, and whilst all people being authenticated will be users, they may not all be admins.

efexen commented 9 years ago

I think user_method should be current_user as this is the practise most auth libs seem to follow, as for the authentication_method I like authenticate_admin as the area we're protecting is admin.

tombeynon commented 9 years ago

Cool, in that case let's leave it as is!