Skip to content

Commit 19fea95

Browse files
committed
changed to Multiauth for Environment, changed authentication/authorisation for ResultBundleResource
- Environment now has the same Authentication/Authorization as all other ModelResources - Added same Authentication and Authorization to ResultBundleResource. Warning: Authorisation is not fully implemented yet! The old test will still pass. Change-Id: I2eb663296be172924c354061e80ac24841f716b2
1 parent 5d1d65c commit 19fea95

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

codespeed/api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ class Meta:
6565
#excludes = ['email', 'password', 'is_superuser']
6666
# Add it here.
6767
authorization = DjangoAuthorization()
68-
#authorization = Authorization()
6968
authentication = ApiKeyAuthentication()
7069

7170

@@ -129,7 +128,6 @@ class Meta:
129128
queryset = Environment.objects.all()
130129
resource_name = 'environment'
131130
authorization = DjangoAuthorization()
132-
#authorization = Authorization()
133131
authentication = ApiKeyAuthentication()
134132
#authentication = MultiAuthentication(Authentication(), ApiKeyAuthentication())
135133

@@ -139,7 +137,8 @@ class ResultResource(ModelResource):
139137

140138
class Meta:
141139
queryset = Result.objects.all()
142-
authorization = Authorization()
140+
authorization = DjangoAuthorization()
141+
authentication = MultiAuthentication(ApiKeyAuthentication(), Authentication())
143142

144143

145144
class ReportResource(ModelResource):
@@ -378,7 +377,8 @@ class ResultBundleResource(Resource):
378377

379378
class Meta:
380379
resource_name = 'benchmark-result'
381-
authorization = Authorization()
380+
authorization = DjangoAuthorization()
381+
authentication = MultiAuthentication(ApiKeyAuthentication(), Authentication())
382382
allowed_methods = ['get', 'post', 'put', 'delete']
383383

384384
def get_resource_uri(self, bundle_or_obj):

0 commit comments

Comments
 (0)