<s> from . . utils . access_permissions import BaseAccessPermissions <EOL> class ProjectorAccessPermissions ( BaseAccessPermissions ) : <EOL> """<STR_LIT>""" <EOL> def can_retrieve ( self , user ) : <EOL> """<STR_LIT>""" <EOL> return user . has_perm ( '<STR_LIT>' ) <EOL> def get_serializer_class ( self , user = None ) : <EOL> """<STR_LIT>""" <EOL> from . serializers import ProjectorSerializer <EOL> return ProjectorSerializer <EOL> class CustomSlideAccessPermissions ( BaseAccessPermissions ) : <EOL> """<STR_LIT>""" <EOL> def can_retrieve ( self , user ) : <EOL> """<STR_LIT>""" <EOL> return user . has_perm ( '<STR_LIT>' ) <EOL> def get_serializer_class ( self , user = None ) : <EOL> """<STR_LIT>""" <EOL> from . serializers import CustomSlideSerializer <EOL> return CustomSlideSerializer <EOL> class TagAccessPermissions ( BaseAccessPermissions ) : <EOL> """<STR_LIT>""" <EOL> def can_retrieve ( self , user ) : <EOL> """<STR_LIT>""" <EOL> from . config import config <EOL> return user . is_authenticated ( ) or config [ '<STR_LIT>' ] <EOL> def get_serializer_class ( self , user = None ) : <EOL> """<STR_LIT>""" <EOL> from . serializers import TagSerializer <EOL> return TagSerializer <EOL> class ChatMessageAccessPermissions ( BaseAccessPermissions ) : <EOL> """<STR_LIT>""" <EOL> def can_retrieve ( self , user ) : <EOL> """<STR_LIT>""" <EOL> return user . has_perm ( '<STR_LIT>' ) <EOL> def get_serializer_class ( self , user = None ) : <EOL> """<STR_LIT>""" <EOL> from . serializers import ChatMessageSerializer <EOL> return ChatMessageSerializer <EOL> class ConfigAccessPermissions ( BaseAccessPermissions ) : <EOL> """<STR_LIT>""" <EOL> def can_retrieve ( self , user ) : <EOL> """<STR_LIT>""" <EOL> from . config import config <EOL> return user . is_authenticated ( ) or config [ '<STR_LIT>' ] <EOL> def get_full_data ( self , instance ) : <EOL> """<STR_LIT>""" <EOL> from . config import config <EOL> return { '<STR_LIT:key>' : instance . key , '<STR_LIT:value>' : config [ instance . key ] } </s>
