Skip to content

Commit 1e87478

Browse files
committed
Small changes in response to code review
1 parent 754f04a commit 1e87478

3 files changed

Lines changed: 2 additions & 3 deletions

File tree

lib/model/migrations/20260505-01-add-project-user-properties.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const up = async (db) => {
2-
await db.raw(``);
32

43
// -- Registry of property names that can be assigned to actors, scoped per project.
54
await db.raw(`

lib/resources/app-users.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module.exports = (service, endpoint) => {
3434
service.get('/projects/:projectId/app-users/:id', endpoint(({ FieldKeys, Projects }, { auth, params, queryOptions }) =>
3535
Projects.getById(params.projectId)
3636
.then(getOrNotFound)
37-
.then((project) => auth.canOrReject('field_key.delete', project))
37+
.then((project) => auth.canOrReject('field_key.list', project))
3838
.then((project) => FieldKeys.getByProjectAndActorId(project.id, params.id, queryOptions))
3939
.then(getOrNotFound)));
4040

test/integration/api/public-links.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ describe('api: /projects/:id/forms/:id/public-links', () => {
171171
});
172172

173173
describe('/:id GET', () => {
174-
it('should return 403 unless the user can delete', testService(async (service) => {
174+
it('should return 403 unless the user can read', testService(async (service) => {
175175
const [asAlice, asChelsea] = await service.login(['alice', 'chelsea']);
176176
const { body: pl } = await asAlice.post('/v1/projects/1/forms/simple/public-links').send({ displayName: 'test1' }).expect(200);
177177
await asChelsea.get(`/v1/projects/1/forms/simple/public-links/${pl.id}`).expect(403);

0 commit comments

Comments
 (0)