mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-22 23:16:46 +00:00
Move the trip surface onto the decorators
Twelve more methods, so the registry owns 50 of 113. rpc-host.ts is down from 1332 lines to 830 and the deps factory from 944 to 500. trips.update keeps its two field-level gates: archiving and changing the cover each need their own admin-configurable permission on top of trip_edit, so a plugin cannot do either on a trip it may otherwise edit. Member management keeps its own grant for the same kind of reason, since adding a member grants trip access, and the owner still cannot be removed through it because that would orphan the trip. canEditTrip stays in HostDeps for now: the db:meta gate still resolves an entity's edit permission through it and has not moved yet.
This commit is contained in:
@@ -54,8 +54,8 @@ describe('plugin RPC coverage ledger', () => {
|
||||
// Update these two numbers in every rollout PR. They make the diff state the size
|
||||
// of the move out loud, which is the number a reviewer wants to see.
|
||||
const total = KNOWN_METHODS.length + UNCONDITIONAL_METHODS.length;
|
||||
expect(fromRegistry.size).toBe(38);
|
||||
expect(legacy.size).toBe(total - 38);
|
||||
expect(fromRegistry.size).toBe(50);
|
||||
expect(legacy.size).toBe(total - 50);
|
||||
});
|
||||
|
||||
it('RPCLEDGER-006 the migrated methods are exactly the ones this PR claims', () => {
|
||||
@@ -89,6 +89,7 @@ describe('plugin RPC coverage ledger', () => {
|
||||
'places.delete',
|
||||
'places.update',
|
||||
'rates.get',
|
||||
'reservations.listMine',
|
||||
'tags.create',
|
||||
'tags.delete',
|
||||
'tags.list',
|
||||
@@ -97,6 +98,17 @@ describe('plugin RPC coverage ledger', () => {
|
||||
'todos.delete',
|
||||
'todos.list',
|
||||
'todos.update',
|
||||
'trips.addMember',
|
||||
'trips.create',
|
||||
'trips.getAccommodations',
|
||||
'trips.getById',
|
||||
'trips.getDays',
|
||||
'trips.getPlaces',
|
||||
'trips.getReservations',
|
||||
'trips.listMine',
|
||||
'trips.members',
|
||||
'trips.removeMember',
|
||||
'trips.update',
|
||||
'weather.get',
|
||||
]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user