Add authorization to all routes
This commit is contained in:
@@ -64,10 +64,10 @@ describe('Tokens API', function () {
|
||||
expect(tokenIds).to.contain(readOnlyToken.id);
|
||||
});
|
||||
|
||||
it('cannot create applink with read only token', async function () {
|
||||
const response = await superagent.post(`${serverUrl}/api/v1/applinks`)
|
||||
it('cannot create token with read only token', async function () {
|
||||
const response = await superagent.post(`${serverUrl}/api/v1/tokens`)
|
||||
.query({ access_token: readOnlyToken.accessToken })
|
||||
.send({ upstreamUri: 'https://cloudron.io' })
|
||||
.send({ name: 'somename' })
|
||||
.ok(() => true);
|
||||
|
||||
expect(response.status).to.equal(403);
|
||||
|
||||
Reference in New Issue
Block a user