node-casbin / egg-authz

egg-authz is an authorization middleware for Egg.js based on Casbin
https://github.com/casbin/node-casbin
Apache License 2.0
51 stars 4 forks source link

Confused in test cases #10

Open shenxiang11 opened 2 years ago

shenxiang11 commented 2 years ago

For example:

 it('test: p, bob, /dataset2/resource1, * - DELETE', async () => {
    app.mockCsrf()
    const response = await app.httpRequest()
      .delete('/dataset2/resource')
      .set('Authorization', 'bob')
    assert(response.status === 403)
  })

test /dataset2/resource1, however request /dataset2/resource

casbin-bot commented 2 years ago

@Gabriel-403 @Zxilly @kingiw @nodece