cd34d30866
* Activate restricted_data_cache on inmemory cache * Use ElementCache in rest-api get requests * Get requests on the restapi return 404 when the user has no permission * Added async function for has_perm and in_some_groups * changed Cachable.get_restricted_data to be an ansync function * rewrote required_user_system * changed default implementation of access_permission.check_permission to check a given permission or check if anonymous is enabled
17 lines
419 B
Python
17 lines
419 B
Python
from ..utils.access_permissions import BaseAccessPermissions
|
|
|
|
|
|
class TopicAccessPermissions(BaseAccessPermissions):
|
|
"""
|
|
Access permissions container for Topic and TopicViewSet.
|
|
"""
|
|
base_permission = 'agenda.can_see'
|
|
|
|
def get_serializer_class(self, user=None):
|
|
"""
|
|
Returns serializer class.
|
|
"""
|
|
from .serializers import TopicSerializer
|
|
|
|
return TopicSerializer
|