diff --git a/assets/js/frontend.js b/assets/js/frontend.js index 37798e4..13ef3e8 100644 --- a/assets/js/frontend.js +++ b/assets/js/frontend.js @@ -1 +1 @@ -import '../scss/frontend.scss'; \ No newline at end of file +import '../scss/frontend.scss'; diff --git a/package-lock.json b/package-lock.json index 70c4504..386f61e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.0.1", "license": "MIT", "dependencies": { + "@fortawesome/fontawesome-free": "^6.5.1", "@popperjs/core": "^2.11.8", "aframe": "^1.5.0", "bootstrap": "^5.3.3", @@ -1719,6 +1720,15 @@ "node": ">=10.0.0" } }, + "node_modules/@fortawesome/fontawesome-free": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.5.1.tgz", + "integrity": "sha512-CNy5vSwN3fsUStPRLX7fUYojyuzoEMSXPl7zSLJ8TgtRfjv24LOnOWKT2zYwaHZCJGkdyRnTmstR0P+Ah503Gw==", + "hasInstallScript": true, + "engines": { + "node": ">=6" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", diff --git a/package.json b/package.json index 485f761..12e6e94 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "webpack-cli": "^5.1.4" }, "dependencies": { + "@fortawesome/fontawesome-free": "^6.5.1", "@popperjs/core": "^2.11.8", "aframe": "^1.5.0", "bootstrap": "^5.3.3", diff --git a/quackscape/tours/views.py b/quackscape/tours/views.py index e093956..c0221f8 100644 --- a/quackscape/tours/views.py +++ b/quackscape/tours/views.py @@ -64,6 +64,14 @@ class SceneEditView(UserPermissionMixin, DetailView): context_object_name = "scene" template_name = "tours/scene_edit.html" + def get_object(self, queryset=None): + obj = super().get_object(queryset) + + if not obj.user_has_permission(self.request.user): + raise PermissionDenied() + + return obj + @method_decorator(xframe_options_exempt, name="dispatch") class SceneEmbedView(SceneView): diff --git a/quackscape/users/templates/users/category.html b/quackscape/users/templates/users/category.html index 5196200..b98acf2 100644 --- a/quackscape/users/templates/users/category.html +++ b/quackscape/users/templates/users/category.html @@ -54,13 +54,15 @@ {% for scene in category.scenes.all %}