• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

safe-global / safe-client-gateway / 26167723906 / 1
90%
main: 90%

Build:
DEFAULT BRANCH: main
Ran 20 May 2026 02:09PM UTC
Files 2275
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 May 2026 02:03PM UTC coverage: 78.381% (-0.05%) from 78.435%
26167723906.1

push

github

web-flow
refactor(members): lift admin check from MembersRepository to MembersService (#3095)

* refactor(members): extract findActiveAdmin on MembersRepository

Pull the inline active-admin lookup inside inviteUsers into a public
method on MembersRepository. Pure refactor — inviteUsers still throws
on non-admin caller and behavior is unchanged.

Preparation for lifting the admin check out of the repository and into
MembersService in subsequent commits.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* refactor(members): move admin check from MembersRepository to MembersService

Lift the active-admin gate from MembersRepository.inviteUsers into the
application layer. The repository is no longer responsible for the
authentication assertion either — both checks now run at the service
entry point.

- MembersService.inviteUser calls getAuthenticatedUserIdOrFail and
  findActiveAdmin, throwing ForbiddenException when no active admin
  membership is found.
- A TODO on inviteUsers signals the next cleanup step: drop authPayload
  and accept invitedBy as a parameter.

Test-suite updates that mirror this move follow in subsequent commits.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* refactor(members): extract assertActiveAdmin helper on MembersService

Pull the authenticated-user + active-admin check out of inviteUser
into a small private assertActiveAdmin helper, so subsequent route
methods on MembersService that need the same gate can call it
directly. No behavior change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* test(members): move not-authenticated case to MembersService spec

Same coverage, new home: the unauthenticated rejection now lives on
the service spec, since the auth assertion moved up with the admin
guard in the preceding prod commits.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* test(members): move not-an-admin case to MembersService + findActive... (continued)

3123 of 5319 branches covered (58.71%)

Branch coverage included in aggregate %.

28187 of 34627 relevant lines covered (81.4%)

247.17 hits per line

Source Files on job run-integration-tests - 26167723906.1
  • Tree
  • List 2275
  • Changed 328
  • Source Changed 3
  • Coverage Changed 327
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 26167723906
  • 18e139e9 on github
  • Prev Job for on main (#26100982395.1)
  • Next Job for on main (#26233283867.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc