Skip to content

Commit

Permalink
Don't give the TRUNCATE permission as part as the role (#7)
Browse files Browse the repository at this point in the history
* Don't give the TRUNCATE permission as part as the  role

* Bump version
  • Loading branch information
JordanP authored Nov 14, 2023
1 parent 4612256 commit 9314f77
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project tries to adhere to [Semantic Versioning](http://semver.org/spec
## [Unreleased]
_this space intentionally left blank_


## [0.7.0] - 2023-11-14

### In Code

- Don't give the TRUNCATE permission as part as the `write` role (@jordanp)

## [0.6.0] - 2023-01-23

### In Code
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ When pgbedrock is run, it would make sure that:
* ``jdoe`` has read-level access (``SELECT``) to all tables in the ``finance`` schema and to the
``marketing.ad_spend`` and ``marketing.impressions`` tables
* ``jdoe`` has default privileges to read from all future tables created in the ``finance`` schema
* ``jdoe`` has write-level access (``SELECT``, ``INSERT``, ``UPDATE``, ``DELETE``, ``TRUNCATE``,
* ``jdoe`` has write-level access (``SELECT``, ``INSERT``, ``UPDATE``, ``DELETE``,
``REFERENCES``, and ``TRIGGER``) to all tables in the ``reports`` schema except for the ``Q2_fixed_assets`` table
* ``jdoe`` has default privileges to write to all future tables created in the ``reports`` schema
* ``jdoe`` has write-level access (``SELECT``, ``USAGE``, ``UPDATE``) to all sequences in the
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ When pgbedrock is run, it would make sure that:
* ``jdoe`` has read-level access (``SELECT``) to all tables in the ``finance`` schema and to the
``marketing.ad_spend`` and ``marketing.impressions`` tables
* ``jdoe`` has default privileges to read from all future tables created in the ``finance`` schema
* ``jdoe`` has write-level access (``SELECT``, ``INSERT``, ``UPDATE``, ``DELETE``, ``TRUNCATE``,
* ``jdoe`` has write-level access (``SELECT``, ``INSERT``, ``UPDATE``, ``DELETE``,
``REFERENCES``, and ``TRIGGER``) to all tables in the ``reports`` schema
* ``jdoe`` has default privileges to write to all future tables created in the ``reports`` schema
* ``jdoe`` has write-level access (``SELECT``, ``USAGE``, ``UPDATE``) to all sequences in the
Expand Down
2 changes: 1 addition & 1 deletion docs/project_goals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pgbedrock was created with several goals in mind:
pgbedrock simplifies object access down to read vs. write. As a result, an administrator
doesn't need to know that within Postgres 'read' access is really ``SELECT`` for tables but
``USAGE`` for schemas, or that write access for schemas means ``CREATE`` but for tables it is a
combination of ``INSERT``, ``UPDATE``, ``DELETE``, ``TRUNCATE``, ``REFERENCES``, and
combination of ``INSERT``, ``UPDATE``, ``DELETE``, ``REFERENCES``, and
``TRIGGER``.

#. **Co-locate all config.**
Expand Down
2 changes: 1 addition & 1 deletion pgbedrock/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = '0.6.0'
__version__ = '0.7.0'
LOG_FORMAT = '%(levelname)s:%(filename)s:%(funcName)s:%(lineno)s - %(message)s'
2 changes: 1 addition & 1 deletion pgbedrock/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
PRIVILEGE_MAP = {
'tables':
{'read': ('SELECT', ),
'write': ('INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER')
'write': ('INSERT', 'UPDATE', 'DELETE', 'REFERENCES', 'TRIGGER')
},
'sequences':
{'read': ('SELECT', ),
Expand Down

0 comments on commit 9314f77

Please sign in to comment.