OpenSlides/openslides/topics/access_permissions.py
Norman Jäckel cab53f0434 Moved custom slides to own app topics for better app structure.
Renamed model to Topic. Added migrations file. Fixed #2402.
2016-09-21 15:00:23 +02:00

21 lines
556 B
Python

from ..utils.access_permissions import BaseAccessPermissions
class TopicAccessPermissions(BaseAccessPermissions):
"""
Access permissions container for Topic and TopicViewSet.
"""
def check_permissions(self, user):
"""
Returns True if the user has read access model instances.
"""
return user.has_perm('agenda.can_see')
def get_serializer_class(self, user=None):
"""
Returns serializer class.
"""
from .serializers import TopicSerializer
return TopicSerializer