mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 04:51:51 +00:00
chore: add docs
This commit is contained in:
@@ -78,6 +78,10 @@ class RowLevelSecurityConstraint(models.BaseConstraint):
|
||||
policy_queries = ""
|
||||
grant_queries = ""
|
||||
for statement in self.statements:
|
||||
# SELECT and DELETE uses USING since applies to rows selected
|
||||
# INSERT uses WITH CHECK becauseonly applies in cases where records are being added
|
||||
# UPDATE requires USING and WITH CHECK but if only a USING clause is specified, then that clause will be used for both USING and WITH CHECK cases.
|
||||
# https://www.postgresql.org/docs/current/sql-createpolicy.html
|
||||
clause = f"{'WITH CHECK' if statement == 'INSERT' else 'USING'}"
|
||||
policy_queries = f"{policy_queries}{self.policy_sql_query.format(statement=statement, clause=clause)}"
|
||||
grant_queries = (
|
||||
|
||||
Reference in New Issue
Block a user