Skip to content

Commit 073baeb

Browse files
committed
Drop session from matching helpers
1 parent b11ce6e commit 073baeb

File tree

18 files changed

+65
-77
lines changed

18 files changed

+65
-77
lines changed

src/components/authorization/policies/conditions/member.condition.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { type Query } from 'cypher-query-builder';
22
import { intersection } from 'lodash';
33
import { inspect, type InspectOptionsStylized } from 'util';
44
import { type ResourceShape, type Role } from '~/common';
5-
import { matchProjectScopedRoles, variable } from '~/core/database/query';
5+
import { matchProjectScopedRoles } from '~/core/database/query';
66
import { rolesForScope, type ScopedRole, splitScope } from '../../dto/role.dto';
77
import {
88
type AsCypherParams,
@@ -101,7 +101,6 @@ class MemberWithRolesCondition<TResourceStatic extends ResourceWithScope>
101101

102102
return query.apply(
103103
matchProjectScopedRoles({
104-
session: variable('requestingUser'),
105104
outputVar: CQL_VAR,
106105
}),
107106
);

src/components/budget/budget-record.repository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export class BudgetRecordRepository extends DtoRepository<
177177
node('organization', 'Organization'),
178178
])
179179
.apply(matchChangesetAndChangedProps(view?.changeset))
180-
.apply(matchPropsAndProjectSensAndScopedRoles(session, { view }))
180+
.apply(matchPropsAndProjectSensAndScopedRoles({ view }))
181181
.return<{ dto: UnsecuredDto<BudgetRecord> }>(
182182
merge('props', 'changedProps', {
183183
parent: 'budget',

src/components/budget/budget.repository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export class BudgetRepository extends DtoRepository<
9090
node('node', label),
9191
])
9292
.where({ 'node.id': inArray(ids) })
93-
.apply(matchPropsAndProjectSensAndScopedRoles(session, { view }))
93+
.apply(matchPropsAndProjectSensAndScopedRoles({ view }))
9494
.apply(matchChangesetAndChangedProps(view?.changeset))
9595
.return<{ dto: UnsecuredDto<Budget> }>(
9696
merge('props', 'changedProps', {

src/components/ceremony/ceremony.repository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class CeremonyRepository extends DtoRepository<
6464
relation('out', '', ACTIVE),
6565
node('node'),
6666
])
67-
.apply(matchPropsAndProjectSensAndScopedRoles(session))
67+
.apply(matchPropsAndProjectSensAndScopedRoles())
6868
.return<{ dto: UnsecuredDto<Ceremony> }>('props as dto');
6969
}
7070

src/components/engagement/engagement.repository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export class EngagementRepository extends CommonRepository {
132132
relation('out', '', 'engagement'),
133133
node('node'),
134134
])
135-
.apply(matchPropsAndProjectSensAndScopedRoles(session, { view }))
135+
.apply(matchPropsAndProjectSensAndScopedRoles({ view }))
136136
.apply(matchChangesetAndChangedProps(view?.changeset))
137137
.optionalMatch([
138138
node('node'),

src/components/language/language.repository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export class LanguageRepository extends DtoRepository<
184184
relation('out', '', 'engagement'),
185185
node('node'),
186186
])
187-
.apply(matchProjectScopedRoles({ session }))
187+
.apply(matchProjectScopedRoles())
188188
.with([
189189
'node',
190190
'collect(project) as projList',

src/components/organization/organization.repository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export class OrganizationRepository extends DtoRepository<
9191
relation('out', 'organization'),
9292
node('node'),
9393
])
94-
.apply(matchProjectScopedRoles({ session }))
94+
.apply(matchProjectScopedRoles())
9595
.with([
9696
'node',
9797
'collect(project) as projList',

src/components/partner/partner.repository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ export class PartnerRepository extends DtoRepository<
210210
relation('out', '', 'partner'),
211211
node('node'),
212212
])
213-
.apply(matchProjectScopedRoles({ session }))
213+
.apply(matchProjectScopedRoles())
214214
.with([
215215
'node',
216216
'collect(project) as projList',

src/components/partnership/partnership.repository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ export class PartnershipRepository extends DtoRepository<
208208
relation('out', '', 'organization', ACTIVE),
209209
node('org', 'Organization'),
210210
])
211-
.apply(matchPropsAndProjectSensAndScopedRoles(session, { view }))
211+
.apply(matchPropsAndProjectSensAndScopedRoles({ view }))
212212
.apply(matchChangesetAndChangedProps(view?.changeset))
213213
.apply(matchProps({ nodeName: 'project', outputVar: 'projectProps' }))
214214
.apply(

src/components/periodic-report/periodic-report.repository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ export class PeriodicReportRepository extends DtoRepository<
416416
relation('out', '', 'report', ACTIVE),
417417
node('node'),
418418
])
419-
.apply(matchPropsAndProjectSensAndScopedRoles(session))
419+
.apply(matchPropsAndProjectSensAndScopedRoles())
420420
.return<{ dto: UnsecuredDto<PeriodicReport> }>(
421421
merge('props', { parent: 'parent' }, 'extra').as('dto'),
422422
);

0 commit comments

Comments
 (0)