# CHANGELOG



## v0.4.6 (2024-05-29)

### Chore

* chore(deps): bump python-semantic-release/python-semantic-release

Bumps [python-semantic-release/python-semantic-release](https://github.com/python-semantic-release/python-semantic-release) from 8.3.0 to 9.7.3.
- [Release notes](https://github.com/python-semantic-release/python-semantic-release/releases)
- [Changelog](https://github.com/python-semantic-release/python-semantic-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python-semantic-release/python-semantic-release/compare/v8.3.0...v9.7.3)

---
updated-dependencies:
- dependency-name: python-semantic-release/python-semantic-release
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] &lt;support@github.com&gt; ([`d9655f1`](https://github.com/adfinis/django-generic-api-permissions/commit/d9655f17afc86e4c3d58858d639654ebf5495293))

* chore(deps-dev): bump ruff from 0.3.5 to 0.4.6

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.3.5 to 0.4.6.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/v0.3.5...v0.4.6)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] &lt;support@github.com&gt; ([`c614700`](https://github.com/adfinis/django-generic-api-permissions/commit/c6147003d33376bb06aa27b408a00ff1ad8d5894))

* chore(deps-dev): bump djangorestframework-jsonapi from 6.1.0 to 7.0.0

Bumps [djangorestframework-jsonapi](https://github.com/django-json-api/django-rest-framework-json-api) from 6.1.0 to 7.0.0.
- [Release notes](https://github.com/django-json-api/django-rest-framework-json-api/releases)
- [Changelog](https://github.com/django-json-api/django-rest-framework-json-api/blob/main/CHANGELOG.md)
- [Commits](https://github.com/django-json-api/django-rest-framework-json-api/compare/v6.1.0...v7.0.0)

---
updated-dependencies:
- dependency-name: djangorestframework-jsonapi
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] &lt;support@github.com&gt; ([`abe4798`](https://github.com/adfinis/django-generic-api-permissions/commit/abe4798e6d81f1549d1caf6ff9e14dff5b682805))

* chore(deps): bump django from 4.2.11 to 4.2.13

Bumps [django](https://github.com/django/django) from 4.2.11 to 4.2.13.
- [Commits](https://github.com/django/django/compare/4.2.11...4.2.13)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] &lt;support@github.com&gt; ([`33362de`](https://github.com/adfinis/django-generic-api-permissions/commit/33362dec0465739b5506145a8d6ba7dad7970d10))

* chore(deps-dev): bump pytest from 8.2.0 to 8.2.1

Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.2.0 to 8.2.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.2.0...8.2.1)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] &lt;support@github.com&gt; ([`90762a1`](https://github.com/adfinis/django-generic-api-permissions/commit/90762a161bf0de2d38c67c0e7f4882605f1b5742))

* chore(deps-dev): bump pytest from 8.1.1 to 8.2.0

Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.1.1 to 8.2.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.1.1...8.2.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] &lt;support@github.com&gt; ([`aaae000`](https://github.com/adfinis/django-generic-api-permissions/commit/aaae0005de84ca778974d192b178705e86aee4cf))

### Fix

* fix(permissions): extend drf permission methods

instead of calling permission in each specific method (create, etc.)
call super in check_object_permission ([`00580d8`](https://github.com/adfinis/django-generic-api-permissions/commit/00580d83c4681df17e366e54942b00b9971ef945))

### Unknown

* Revert &#34;chore(deps): bump python-semantic-release/python-semantic-release&#34;

This reverts commit d9655f17afc86e4c3d58858d639654ebf5495293. ([`18e447a`](https://github.com/adfinis/django-generic-api-permissions/commit/18e447a2fcc1e417270f9d16b5607f5b0ce7d675))


## v0.4.5 (2024-04-17)

### Chore

* chore(release): 0.4.5

Automatically generated by python-semantic-release ([`dc7e8e5`](https://github.com/adfinis/django-generic-api-permissions/commit/dc7e8e540c2f1318392f984a8d77c56bd8a99f7f))

* chore: fix maintenance docs (#39) ([`9947377`](https://github.com/adfinis/django-generic-api-permissions/commit/99473779dca83ea5c4affe02f3625683e1b9e1c5))

* chore: add CONTRIBUTING.md, allow running pytest directly in dev (#50)

Co-authored-by: Fabio Ambauen &lt;1833932+open-dynaMIX@users.noreply.github.com&gt; ([`4fd4a34`](https://github.com/adfinis/django-generic-api-permissions/commit/4fd4a34b2e7982048f1a4db695a598d214667dcb))

* chore(deps): bump django from 4.2.9 to 4.2.11

Bumps [django](https://github.com/django/django) from 4.2.9 to 4.2.11.
- [Commits](https://github.com/django/django/compare/4.2.9...4.2.11)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] &lt;support@github.com&gt; ([`a6b445d`](https://github.com/adfinis/django-generic-api-permissions/commit/a6b445da1d2baaa304d997320ca77c87ed2f0957))

* chore(deps-dev): bump ruff from 0.2.2 to 0.3.5

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.2.2 to 0.3.5.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/v0.2.2...v0.3.5)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] &lt;support@github.com&gt; ([`42d7930`](https://github.com/adfinis/django-generic-api-permissions/commit/42d7930176a5bec01f93159fa8395783a39c8c22))

### Fix

* fix: don&#39;t check permissions for GET requests (#51)

Permissions should only deal with POST/PATCH/DELETE - GET requests
should be entirely governed by the visibility layer. ([`774f259`](https://github.com/adfinis/django-generic-api-permissions/commit/774f2594a56d824f1b5f9bba3d44de15b115f55c))


## v0.4.4 (2024-03-20)

### Chore

* chore(release): 0.4.4

Automatically generated by python-semantic-release ([`d765283`](https://github.com/adfinis/django-generic-api-permissions/commit/d765283ccc338171f5cebf8837e6000cffb8cc93))

### Fix

* fix: add fallback for queryset of read_only related fields (#38)

Read only fields don&#39;t have a queryset (see
https://github.com/encode/django-rest-framework/blame/77ef27f18fc7c11e1d2e5fd4aaa8acc51cda6792/rest_framework/utils/field_mapping.py#L288), so we need to provide a fallback. ([`9f6ed09`](https://github.com/adfinis/django-generic-api-permissions/commit/9f6ed09b26ee238bdccee401dce8ae4fba5332ff))


## v0.4.3 (2024-03-15)

### Chore

* chore(release): 0.4.3

Automatically generated by python-semantic-release ([`f9a4687`](https://github.com/adfinis/django-generic-api-permissions/commit/f9a4687256ab602631453ad7b6aaa782ac20b12e))

* chore(deps-dev): bump ruff from 0.1.11 to 0.2.2 (#30)

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.11 to 0.2.2.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/v0.1.11...v0.2.2)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] &lt;support@github.com&gt;
Co-authored-by: dependabot[bot] &lt;49699333+dependabot[bot]@users.noreply.github.com&gt; ([`c40eed7`](https://github.com/adfinis/django-generic-api-permissions/commit/c40eed75567b31f71eb9a998724bd402a1582aed))

### Documentation

* docs(readme): fix typo in readme ([`3a76b16`](https://github.com/adfinis/django-generic-api-permissions/commit/3a76b167e018a9ed2b172431f08a386b1a9edf2c))

### Fix

* fix(validation): fix initialization of validator classes (#37) ([`f4dae3e`](https://github.com/adfinis/django-generic-api-permissions/commit/f4dae3e457f6444e6cf8ddf4fdd706aed46bb0f4))


## v0.4.2 (2024-01-08)

### Chore

* chore(release): 0.4.2

Automatically generated by python-semantic-release ([`0b7bcc0`](https://github.com/adfinis/django-generic-api-permissions/commit/0b7bcc078b0ea745cab063ee344f5f580d90c382))

* chore(deps): revert semantic release to 8.3.0 ([`9855045`](https://github.com/adfinis/django-generic-api-permissions/commit/985504522a059fefe2a2aeb44f6b1494bde905a2))

* chore(deps): bump python-semantic-release/python-semantic-release (#16)

Bumps [python-semantic-release/python-semantic-release](https://github.com/python-semantic-release/python-semantic-release) from 8.7.0 to 8.7.2.
- [Release notes](https://github.com/python-semantic-release/python-semantic-release/releases)
- [Changelog](https://github.com/python-semantic-release/python-semantic-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python-semantic-release/python-semantic-release/compare/v8.7.0...v8.7.2)

---
updated-dependencies:
- dependency-name: python-semantic-release/python-semantic-release
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] &lt;support@github.com&gt;
Co-authored-by: dependabot[bot] &lt;49699333+dependabot[bot]@users.noreply.github.com&gt; ([`25eed91`](https://github.com/adfinis/django-generic-api-permissions/commit/25eed919efaad041353070d35f87795cb9a474fa))

* chore(deps): bump django from 4.2.8 to 4.2.9 (#15)

Bumps [django](https://github.com/django/django) from 4.2.8 to 4.2.9.
- [Commits](https://github.com/django/django/compare/4.2.8...4.2.9)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] &lt;support@github.com&gt;
Co-authored-by: dependabot[bot] &lt;49699333+dependabot[bot]@users.noreply.github.com&gt; ([`5410af0`](https://github.com/adfinis/django-generic-api-permissions/commit/5410af0b6c1fce1fc4a08d583953e6298f5c20aa))

* chore(deps-dev): bump ruff from 0.1.9 to 0.1.11 (#14)

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.9 to 0.1.11.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/v0.1.9...v0.1.11)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] &lt;support@github.com&gt;
Co-authored-by: dependabot[bot] &lt;49699333+dependabot[bot]@users.noreply.github.com&gt; ([`4f80c4f`](https://github.com/adfinis/django-generic-api-permissions/commit/4f80c4f0461149ee5982b884e0a98419b0cea9f3))

* chore: change semantic release commit message ([`6d39527`](https://github.com/adfinis/django-generic-api-permissions/commit/6d395276bbba71647d87cbc09f71ce29eac64e7c))

### Fix

* fix: pass correct request param for relationships ([`0609f64`](https://github.com/adfinis/django-generic-api-permissions/commit/0609f648a386ff4fe615d21aa120a7a3e9b50acd))


## v0.4.1 (2024-01-03)

### Chore

* chore: add python to release action ([`9c16fa4`](https://github.com/adfinis/django-generic-api-permissions/commit/9c16fa4eed2402aa4e99f3ae6de522522ec73f01))

* chore: add poetry to release action ([`d76b9d9`](https://github.com/adfinis/django-generic-api-permissions/commit/d76b9d963cb3a77b15f789b28480b1015eb292b7))

* chore: add build command ([`67e2529`](https://github.com/adfinis/django-generic-api-permissions/commit/67e2529ec1a824debc0a706cc642b033f28cd3e0))

### Fix

* fix: increase min python for flake8 ([`393b930`](https://github.com/adfinis/django-generic-api-permissions/commit/393b93054371477b73f998ea61ffed29c247de53))

### Unknown

* 0.4.1

Automatically generated by python-semantic-release ([`ed354db`](https://github.com/adfinis/django-generic-api-permissions/commit/ed354dbb41213fb8eeae30c5a08a73ae8bf72832))


## v0.4.0 (2024-01-03)

### Chore

* chore: fix version variable semantic release ([`83a33d2`](https://github.com/adfinis/django-generic-api-permissions/commit/83a33d25754883f789df5e69558c96ddaee45446))

* chore: fix semantic release action version ([`3ed75e0`](https://github.com/adfinis/django-generic-api-permissions/commit/3ed75e07f3550a1c27b23254837a53db4ee1418d))

* chore: fix release.yml (#13) ([`6d6a0ee`](https://github.com/adfinis/django-generic-api-permissions/commit/6d6a0eeaffcfd1f90e920c663988f3e11c56db45))

### Feature

* feat: migrate to poetry

add sematic release ([`41c9226`](https://github.com/adfinis/django-generic-api-permissions/commit/41c922646b76ee4f2d7b9e2affdf6ddde09a6786))

### Fix

* fix: import after app is ready ([`db1d1e6`](https://github.com/adfinis/django-generic-api-permissions/commit/db1d1e669f4fab8f7449d690ba7c8a36c51eb75c))

### Unknown

* 0.4.0

Automatically generated by python-semantic-release ([`f83cd9f`](https://github.com/adfinis/django-generic-api-permissions/commit/f83cd9fbf966cd479bb8ca567550c20f94d9686e))

* Merge pull request #12 from adfinis/poetry

feat: migrate to poetry, semantic release ([`9a4ea26`](https://github.com/adfinis/django-generic-api-permissions/commit/9a4ea261555a3b223696a4c9f3dbbe3d326e7953))

* Merge pull request #11 from adfinis/fix-app-ready

fix: import after app is ready ([`6020979`](https://github.com/adfinis/django-generic-api-permissions/commit/6020979fb4a48fa2c6c52aaf42c9105b4fc2ec48))


## v0.3.0 (2023-12-27)

### Chore

* chore: release 0.3.0 ([`4bdbc79`](https://github.com/adfinis/django-generic-api-permissions/commit/4bdbc79b6e804bdf58c4d761f18d78b4a8034765))

### Feature

* feat: filter manytomany relations ([`34be60c`](https://github.com/adfinis/django-generic-api-permissions/commit/34be60cdd63adc276eac14108f578f7ce7cfff52))

* feat: implement foreignkey visibility filtering ([`7d01398`](https://github.com/adfinis/django-generic-api-permissions/commit/7d01398073c6058008cc49ab9906d87d5dbd9865))

* feat: add visibiility mixin for relationships ([`545c36a`](https://github.com/adfinis/django-generic-api-permissions/commit/545c36a34480c2b7ed6068aab98aece97e977f88))

### Fix

* fix: improve type checks ([`0ee7e0e`](https://github.com/adfinis/django-generic-api-permissions/commit/0ee7e0e53cf895fde4200903e328be3a2e038ec1))

* fix: prevent overwrite of hidden relations in patch ([`7247483`](https://github.com/adfinis/django-generic-api-permissions/commit/72474834f6384a90fc78b92e74d440d56aed7ab5))

* fix: remove unnecessary get_queryset from RelatedFieldMixin ([`15e2ea4`](https://github.com/adfinis/django-generic-api-permissions/commit/15e2ea4ecb34b3935eef5784e1301001947b368a))

* fix: fix test setup ([`a23d244`](https://github.com/adfinis/django-generic-api-permissions/commit/a23d244659f54422a955469a8f976b242af2c238))

* fix: change MRO for serializer relation fields ([`09f13fe`](https://github.com/adfinis/django-generic-api-permissions/commit/09f13fe014ab606a3962deecfcd96113a4d799c6))

* fix: add more python versions to test

switch to ruff ([`2d988db`](https://github.com/adfinis/django-generic-api-permissions/commit/2d988db8a828e40bad296b1b79699ded83da21ca))

* fix: fix test suite ([`7adea9e`](https://github.com/adfinis/django-generic-api-permissions/commit/7adea9e7552f8564020d64acebf9c63865d66a4b))

### Unknown

* Merge pull request #10 from adfinis/release-0.3.0

chore: release 0.3.0 ([`57353e5`](https://github.com/adfinis/django-generic-api-permissions/commit/57353e57a2708f041b5e5cfc418c4c2c6bfefa9d))

* Merge pull request #9 from adfinis/fix-relation-patch

fix: prevent overwrite of hidden relations in patch ([`216fb80`](https://github.com/adfinis/django-generic-api-permissions/commit/216fb80ddd5c73f9f7620b8e98ef7ce4bb06edef))

* Merge pull request #8 from adfinis/relationship-visibility

feat: add visibiilities to relationships ([`aee4880`](https://github.com/adfinis/django-generic-api-permissions/commit/aee488059bcd965448591efeaf644a0de67de6fc))


## v0.2.0 (2021-08-26)

### Chore

* chore: version bump 0.2.0 ([`ac19e5c`](https://github.com/adfinis/django-generic-api-permissions/commit/ac19e5c1565c4de98c8feee5e666f6c5f929c3fe))

* chore(tests): django changes

Django 5 will set USE_TZ to default and warns if our settings.py doesn&#39;t contain it.
Also, they renamed the master branc to main. Django-latest requires Python 3.8+, so
we cannot test that combination anymore ([`53b5352`](https://github.com/adfinis/django-generic-api-permissions/commit/53b5352faeca0afb302682697697f7d5ff8f929d))

### Refactor

* refactor: unify the code base, add validation

Since the code base baseicall does the same for four different objectives,
we shouldn&#39;t have multiple, similar implementations of basically the same things.

This introduces a generic config class that is used to register
permission, visibility, and validation classes. The interface to using the package has been
cleaned up as well: The model classes won&#39;t need a mixin anymore for either visibility
or permissions to work. The permission classes don&#39;t need to inherit from the `BasePermission` anymore either

There is now a clean import / usage structure to use this package:

* all permissions stuff can be imported from `generic_permissions.permissions`
* all visibility stuff can be imported from `generic_permissions.visibilities`
* all validation stuff can be imported from `generic_permissions.validation` ([`faa61d2`](https://github.com/adfinis/django-generic-api-permissions/commit/faa61d21c7200c88e33455c6dba2bfac84465012))

### Unknown

* Merge pull request #6 from winged/bump

chore: version bump 0.2.0 ([`8caaaa7`](https://github.com/adfinis/django-generic-api-permissions/commit/8caaaa785336b432a1cf21f5a0f49257ef6ffb97))

* Merge pull request #5 from winged/feat_validation

refactor: unify the code base, add validation ([`c219d7d`](https://github.com/adfinis/django-generic-api-permissions/commit/c219d7d98bb7054909b20e90dc801c4f3c696cdb))


## v0.1.0 (2020-12-18)

### Chore

* chore: prepare first proper release ([`0d5d677`](https://github.com/adfinis/django-generic-api-permissions/commit/0d5d677db07af945447408044720fa5f93ba60c6))

* chore: prepare metadata for PyPI release ([`c89cf9c`](https://github.com/adfinis/django-generic-api-permissions/commit/c89cf9cfe488bd675aa642ebe87a5c76ac8ced46))

### Feature

* feat: add initial implementation ([`2a8d8b4`](https://github.com/adfinis/django-generic-api-permissions/commit/2a8d8b4969b6a1917c397b86e8040493f26aa0df))

### Unknown

* Merge pull request #3 from open-dynaMIX/prepare_initial_release

chore: prepare first proper release ([`748b194`](https://github.com/adfinis/django-generic-api-permissions/commit/748b19432bc622b4dbdc279a8ecbfe47052c8ac2))

* Merge pull request #2 from open-dynaMIX/prepare_metadata

chore: prepare metadata for PyPI release ([`3ad42d3`](https://github.com/adfinis/django-generic-api-permissions/commit/3ad42d3523f7a0f263d308e1b02707b2b180db63))

* Merge pull request #1 from open-dynaMIX/initial_implementation

feat: add initial implementation ([`de8671f`](https://github.com/adfinis/django-generic-api-permissions/commit/de8671f428d3a92aa53107bd33631d877ed38f2e))

* initial commit ([`9483f26`](https://github.com/adfinis/django-generic-api-permissions/commit/9483f26dc37a8280a7b4331ba4d33deb73fe2126))
