Hackathonners / swap

Swap - Simplifying shift exchanges
MIT License
12 stars 6 forks source link

feat: set the institutional domain #29

Closed alves-luis closed 1 year ago

alves-luis commented 4 years ago

Purpose Make it usable outside the alunos.uminho.pt domain.

What has been added Swap will now look for an env variable called STUDENT_INSTITUTIONAL_MAIL_DOMAIN(didn't come up with a better name, looking forward to suggestions :smile:), and sets it as the e-mail address of students who register on the platform. By default, it will be set to what had been hard-coded until now (alunos.uminho.pt).

What could be added The possibility to define different regex patterns to validate a _studentnumber. It is currently hardcoded as /^(a|pg)[0-9]+$/i in app/Providers/AppServiceProvider.

fntneves commented 4 years ago

Hi @alves-luis,

Thank you for your PR!

I see the relevance of this change.

However, I would like to keep tests, seeders and factories unchanged, since the configuration value is not important for tests case.

IMO, this should be more flexible than it is with a configuration variable. For instance, by means of adding a setting property for collecting multiple valid email domains. This should be implemented in the future. :+1: