Skip to content

Commit

Permalink
Merge pull request #34 from keboola/piv-new-grant
Browse files Browse the repository at this point in the history
Add unused grant to list
  • Loading branch information
pivnicek authored Mar 19, 2024
2 parents 34fa30f + 7bf4a8d commit 96e6483
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Snowflake/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,12 @@ public function grantRoleToUser(string $user, string $role): void
public function assignGrantToRole(GrantToRole $grant): void
{
if ($grant->getGrantedOn() === 'SCHEMA' &&
(in_array($grant->getPrivilege(), ['CREATE BUDGET', 'CREATE ANOMALY_DETECTION', 'CREATE FORECAST']))) {
(in_array(
$grant->getPrivilege(),
['CREATE SNOWFLAKE.CORE.BUDGET', 'CREATE BUDGET', 'CREATE ANOMALY_DETECTION', 'CREATE FORECAST']
))
) {
// CREATE SNOWFLAKE.CORE.BUDGET
// CREATE BUDGET is not supported in Snowflake
// CREATE ANOMALY_DETECTION likewise
// CREATE FORECAST likewise
Expand Down

0 comments on commit 96e6483

Please sign in to comment.