No others should be allowed to automatically authenticate.
ORIGINAL PLAN HIDDEN
Maybe this happens like so:
- Staff Users should have the ability to create Student Users
- In the User model there should be some utility method `check_user_acess`
- `check_user_access` should be called in a conditional in the `self.from_omniauth(auth_hash)` method in the User model.
[REVISED 9/2/16]
Staff Users should have the ability to create Student Users
Streamlining this process should be its own Issue, I think
[x] In the User model there should be some Class method check_user_access
[x] check_user_access should be called in a conditional in sessions_controller.rb
- Admin User creates a cohort
- Admin User creates Student Users that belong to cohort
- Students belong to cohorts through profiles. Therefore, Admin User must also create these.
> A note for another time, maybe if a User is a Student they MUST have a cohort? Probably no way to do conditional validations on a single model like that
- Student Users can only log into the application if they already exist in the application
---
> A consideration after this amount of work is finished -- what happens if a student changes their email or github username?
No others should be allowed to automatically authenticate.
ORIGINAL PLAN HIDDEN
[REVISED 9/2/16]
Staff Users should have the ability to create Student Userscheck_user_access
check_user_access
should be called in a conditional in sessions_controller.rb