mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-15 06:16:04 +00:00
fix(auth): restrict Sentinel access and register S3 policy
This commit is contained in:
1 parent
46a9578d69
commit
d2deaa8363
9 files changed
+146
-10
No files matched your search
@@ -152,6 +152,18 @@ it('allows team admin to manage sentinel, ca certificate, and view security', fu
|
||||
|
||||
$policy = new ServerPolicy;
|
||||
expect($policy->manageSentinel($user, $server))->toBeTrue();
|
||||
expect($policy->viewSentinel($user, $server))->toBeTrue();
|
||||
expect($policy->manageCaCertificate($user, $server))->toBeTrue();
|
||||
expect($policy->viewSecurity($user, $server))->toBeTrue();
|
||||
});
|
||||
|
||||
it('denies team member to view sentinel', function () {
|
||||
$user = Mockery::mock(User::class)->makePartial();
|
||||
$user->shouldReceive('isAdminOfTeam')->with(1)->andReturn(false);
|
||||
|
||||
$server = Mockery::mock(Server::class)->makePartial();
|
||||
$server->team_id = 1;
|
||||
|
||||
$policy = new ServerPolicy;
|
||||
expect($policy->viewSentinel($user, $server))->toBeFalse();
|
||||
});
|
||||
Reference in new issue
Block a user