Commit e8260f65 authored by Bruno Martin's avatar Bruno Martin
Browse files

add method to verify if user is coordinator or assistant

in a classroom
parent 74edd24c
......@@ -67,6 +67,9 @@ class Classroom(models.Model):
def chat_url(self):
return '{}group/{}'.format(settings.ROCKET_CHAT['address'],
def is_assistant_or_coordinator(self, user):
return user in (self.assistants.all() | self.coordinators.all())
class Event(models.Model):
title = models.CharField(
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment