CHSCodeForChange / Sapphire-Web

The website/backend repository for Sapphire, a platform to help organizations manage volunteers.
https://sapphire-web.herokuapp.com
GNU General Public License v3.0
8 stars 2 forks source link

Use permission tags instead of passing in is_organizer #35

Closed jpaav closed 6 years ago

jpaav commented 6 years ago

permission tags are made for this sort of thing. Specifically in volunteer/views with functions event and slot but there may be more.

armaangoel78 commented 6 years ago

Remember that groups broke the permissions tag idea since they have to be dynamic, that is why we pass is organizer. We may be able to move back to permission tags as Jared found a way to do so, but for now the way we do it works.

armaangoel78 commented 6 years ago

If you are curious the new we do it is by storing a list of volunteers and organizers in the group model. To check if they are an organizer or volunteer there is a function in the model that sees if the user is on the list.

jpaav commented 6 years ago

Yeah I think that moving back to permission tags wouldn't be too much of a hassle. Its up to you if you think its worth it I can do it now.

jpaav commented 6 years ago

Currently not worth the trouble since it offers only small performance difference if any.