Ejemplo n.º 1
0
 class Meta:
     object_class = models.MediaLibrary
     resource_name = 'media_library'
     allowed_methods = ('get', 'post', 'put', 'patch', 'delete')
     excludes = ('id', 'mediafile', 'thumbnail', 'container_safe')
     filtering = {
         'created_by': ALL,
         'updated_by': ALL,
         'status': ('exact', 'ne'),
         'created': DATE_FILTERS,
         'updated': DATE_FILTERS,
         'container': ALL,
         'is_file': ALL
     }
     ordering = (
         'is_file',
         'name',
         'container',
         'status',
         'created',
         'updated',
     )
     always_return_data = True
     authorization = AnyoneCanViewAuthorization()
     authentication = MultiAuthentication(AppApiKeyAuthentication(),
                                          CookieBasicAuthentication())
Ejemplo n.º 2
0
 class Meta:
     resource_name = 'admin_user'
     object_class = models.MongoUser
     allowed_methods = ('get', 'post', 'put', 'patch', 'delete')
     excludes = ('id', 'password', 'api_key', 'api_key_created')
     filtering = {
         'username':
         ALL,  # Filters are tuned to handle Authentication in the URL.
         'is_active': ('exact', 'ne'),
         'date_joined': DATE_FILTERS
     }
     authorization = StaffAuthorization()
     authentication = MultiAuthentication(AppApiKeyAuthentication(),
                                          CookieBasicAuthentication())
Ejemplo n.º 3
0
 class Meta:
     object_class = models.MongoGroup
     resource_name = 'admin_group'
     excludes = ('id', )
     allowed_methods = (
         'get',
         'post',
         'put',
         'patch',
         'delete',
     )
     authentication = MultiAuthentication(AppApiKeyAuthentication(),
                                          CookieBasicAuthentication())
     authorization = StaffAuthorization()
Ejemplo n.º 4
0
 class Meta:
     object_class = models.Manuscript
     allowed_methods = ('get', 'post', 'patch', 'delete')
     filtering = {
         'status': ALL,
         'created': DATE_FILTERS,
         'last_updated': DATE_FILTERS,
     }
     excludes = ('id', )
     ordering = (
         'name',
         'title',
         'status',
         'created',
         'updated',
     )
     always_return_data = True
     authorization = AnyoneCanViewAuthorization()
     authentication = MultiAuthentication(AppApiKeyAuthentication(),
                                          CookieBasicAuthentication())
Ejemplo n.º 5
0
 class Meta:
     object_class = models.Section
     allowed_methods = ('get', 'post', 'put', 'patch', 'delete')
     excludes = ('id', )
     filtering = {
         'created_by': ALL,
         'updated_by': ALL,
         'status': ('exact', 'ne'),
         'created': DATE_FILTERS,
         'last_updated': DATE_FILTERS,
     }
     ordering = (
         'name',
         'help_text',
         'status',
         'created',
         'updated',
     )
     always_return_data = True
     authorization = AppAuthorization()
     authentication = MultiAuthentication(AppApiKeyAuthentication(),
                                          CookieBasicAuthentication())
Ejemplo n.º 6
0
 class Meta:
     object_class = models.ManuscriptContent
     always_return_data = True
     authorization = AnyoneCanViewAuthorization()
     authentication = MultiAuthentication(AppApiKeyAuthentication(),
                                          CookieBasicAuthentication())
Ejemplo n.º 7
0
 class Meta:
     object_class = models.GlobalPermission
     allowed_methods = ('get', 'post', 'put', 'patch', 'delete')
     authorization = StaffAuthorization()
     authentication = MultiAuthentication(AppApiKeyAuthentication(),
                                          CookieBasicAuthentication())