Ejemplo n.º 1
0
Archivo: api.py Proyecto: flyun/zamboni
 class Meta(MarketplaceModelResource.Meta):
     authentication = (SharedSecretAuthentication(), OAuthAuthentication())
     authorization = OwnerAuthorization()
     detail_allowed_methods = ['get', 'patch', 'put']
     fields = ['display_name']
     list_allowed_methods = []
     queryset = UserProfile.objects.filter()
     resource_name = 'settings'
Ejemplo n.º 2
0
 class Meta(MarketplaceResource.Meta):
     always_return_data = True
     authentication = OAuthAuthentication()
     authorization = Authorization()
     detail_allowed_methods = []
     list_allowed_methods = ['post']
     object_class = dict
     resource_name = 'install'
Ejemplo n.º 3
0
 class Meta(MarketplaceModelResource.Meta):
     authentication = (SharedSecretAuthentication(), OAuthAuthentication())
     authorization = OwnerAuthorization()
     detail_allowed_methods = ['get']
     list_allowed_methods = []
     fields = ['resource_uri']
     queryset = UserProfile.objects.filter()
     resource_name = 'permissions'
Ejemplo n.º 4
0
Archivo: api.py Proyecto: at13/zamboni
 class Meta(MarketplaceModelResource.Meta):
     validation = BangoFormValidation()
     queryset = PaymentAccount.objects.all()
     list_allowed_methods = ['get', 'post']
     detail_allowed_methods = ['get', 'put', 'delete']
     authentication = OAuthAuthentication()
     authorization = Authorization()
     resource_name = 'account'
Ejemplo n.º 5
0
 class Meta(MarketplaceResource.Meta):
     always_return_data = True
     authentication = (SharedSecretAuthentication(), OAuthAuthentication())
     authorization = Authorization()
     detail_allowed_methods = []
     list_allowed_methods = ['post']
     object_class = GenericObject
     resource_name = 'prepare'
     validation = CleanedDataFormValidation(form_class=PrepareForm)
Ejemplo n.º 6
0
 class Meta:
     queryset = MonolithRecord.objects.all()
     allowed_methods = ['get', 'delete']
     resource_name = 'data'
     filtering = {'recorded': ['exact', 'lt', 'lte', 'gt', 'gte'],
                  'key': ['exact', 'startswith'],
                  'id': ['lte', 'gte']}
     authorization = PermissionAuthorization('Monolith', 'API')
     authentication = OAuthAuthentication()
Ejemplo n.º 7
0
 class Meta(MarketplaceModelResource.Meta):
     queryset = Preview.objects.all()
     list_allowed_methods = ['post']
     allowed_methods = ['get', 'delete']
     always_return_data = True
     fields = ['id', 'filetype']
     authentication = OAuthAuthentication()
     authorization = OwnerAuthorization()
     resource_name = 'preview'
     filtering = {'addon': ALL_WITH_RELATIONS}
Ejemplo n.º 8
0
 class Meta(MarketplaceModelResource.Meta):
     queryset = Addon.objects.filter(type=amo.ADDON_WEBAPP)
     fields = ['status', 'disabled_by_user']
     list_allowed_methods = []
     allowed_methods = ['patch', 'get']
     always_return_data = True
     authentication = OAuthAuthentication()
     authorization = AppOwnerAuthorization()
     resource_name = 'status'
     serializer = Serializer(formats=['json'])
Ejemplo n.º 9
0
 class Meta:
     authentication = OAuthAuthentication()
     authorization = PermissionAuthorization('Transaction', 'NotifyFailure')
     detail_allowed_methods = ['patch']
     queryset = Contribution.objects.filter(uuid__isnull=False)
     resource_name = 'failure'
Ejemplo n.º 10
0
 class Meta(MarketplaceResource.Meta):
     list_allowed_methods = ['post']
     detail_allowed_methods = []
     resource_name = 'newsletter'
     authorization = Authorization()
     authentication = (SharedSecretAuthentication(), OAuthAuthentication())
Ejemplo n.º 11
0
 class Meta(MarketplaceResource.Meta):
     authentication = OAuthAuthentication()
     authorization = PermissionAuthorization('Apps', 'Review')
     list_allowed_methods = ['get']
     resource_name = 'reviewing'