Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/MaibornWolff/SecObserve into…
Browse files Browse the repository at this point in the history
… stackable
  • Loading branch information
dervoeti committed Nov 26, 2024
2 parents bd6a159 + 090fa32 commit ee0b42d
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ def test_authentication(self, mock_user):
)
self._check_authentication(["post"], "/api/license_policies/1/copy/")
self._check_authentication(["post"], "/api/license_policies/1/apply/")
self._check_authentication(["post"], "/api/license_policies/apply_product/")

self._check_authentication(["get", "post"], "/api/license_policy_items/")
self._check_authentication(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from application.core.models import Product
from application.licenses.models import License_Policy
from unittests.access_control.api.test_authorization import (
APITest,
Expand Down Expand Up @@ -258,6 +259,59 @@ def test_authorization_license_policies(self):
)
)

product_1 = Product.objects.get(pk=1)
license_policy_1000 = License_Policy.objects.get(pk=1000)
product_1.license_policy = license_policy_1000
product_1.save()

self._test_api(
APITest(
"db_admin",
"post",
"/api/license_policies/apply_product/?product=1",
None,
204,
None,
no_second_user=False,
)
)

self._test_api(
APITest(
"db_internal_write",
"post",
"/api/license_policies/apply_product/?product=1",
None,
204,
None,
no_second_user=False,
)
)

self._test_api(
APITest(
"db_internal_read",
"post",
"/api/license_policies/apply_product/?product=1",
None,
403,
None,
no_second_user=False,
)
)

self._test_api(
APITest(
"db_external",
"post",
"/api/license_policies/apply_product/?product=1",
None,
403,
None,
no_second_user=False,
)
)

self._test_api(
APITest(
"db_internal_write",
Expand Down
16 changes: 8 additions & 8 deletions end_to_end_tests/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion end_to_end_tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"author": "",
"devDependencies": {
"@playwright/test": "1.49.0",
"@types/node": "22.9.3"
"@types/node": "22.10.0"
}
}
44 changes: 22 additions & 22 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@fortawesome/free-solid-svg-icons": "6.7.1",
"@fortawesome/react-fontawesome": "0.2.2",
"@textea/json-viewer": "3.5.0",
"axios": "1.7.7",
"axios": "1.7.8",
"chart.js": "4.4.6",
"markdown-to-jsx": "7.7.0",
"mermaid": "11.4.0",
Expand Down Expand Up @@ -49,7 +49,7 @@
"@microsoft/eslint-formatter-sarif": "3.1.0",
"@trivago/prettier-plugin-sort-imports": "4.3.0",
"@types/inflection": "1.13.2",
"@types/node": "22.9.3",
"@types/node": "22.10.0",
"@types/prop-types": "15.7.13",
"@types/react": "18.3.12",
"@types/react-dom": "18.3.1",
Expand All @@ -62,7 +62,7 @@
"eslint-plugin-react-hooks": "rc",
"eslint-plugin-security": "3.0.1",
"globals": "15.12.0",
"prettier": "3.3.3",
"prettier": "3.4.0",
"rewire": "7.0.0",
"typescript": "5.7.2",
"vite": "5.4.11"
Expand Down

0 comments on commit ee0b42d

Please sign in to comment.