rails-girls-summer-of-code / rgsoc-teams

Teams management and activity
https://teams.railsgirlssummerofcode.org
MIT License
68 stars 140 forks source link

Provide a way to switch current_user's role in development mode #547

Open carpodaster opened 7 years ago

carpodaster commented 7 years ago

Similar to the season switch (#304), we should offer a way to quickly assign a role (and team) to the currently logged in user session – only in development.

emcoding commented 7 years ago

Assigning a role is solved with #571. Close this? Do we need a new issue for switching teams?

carpodaster commented 7 years ago

571 doesn't assign a role, it merely switches current_user to a different user record – re-using everything, including roles, that user record had configured before.

Switching roles is not necessarily equivalent with switching teams: e.g. the "orga" role is just a role w/o a team. Students, coaches and mentors require a team, that's true.

It's debatable if #571 can be used to satisfy this feature request, but we'd have to make sure that there are users with various different roles in a local dev environment. Does the seed.rb provide that?

emcoding commented 7 years ago

The seeds.rb provides all kind of users with all the different roles covered.

That means, you are able to impersonate an organizer or any role. It is not the same as turning yourself into an organizer etc, but I'd say it covers almost all use cases?

Re: the teams I am not sure if the teams seeding and the impersonation covers everything. Hence the new issue. It requires some research.