diff --git a/.eslintrc.yaml b/.eslintrc.yaml index 586cdd232..427f3a1e9 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -1,11 +1,4 @@ -parserOptions: - ecmaVersion: 2018 - -overrides: - - files: - - "src/octoprint/static/js/**.js" - - "src/octoprint/plugins/**.js" - env: - browser: true - jquery: true - es6: true +env: + browser: true + jquery: true + es2018: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6ffd3a093..0cde70f61 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -61,11 +61,9 @@ repos: hooks: - id: prettier - repo: https://github.com/pre-commit/mirrors-eslint - rev: v8.34.0 + rev: v8.35.0 hooks: - id: eslint - additional_dependencies: - - eslint@7.19.0 files: \.js$ exclude: ^(src/octoprint/vendor/|tests/static/js/lib|tests/util/_files|docs/|scripts/|translations/) - repo: https://github.com/codespell-project/codespell diff --git a/docs/api/timelapse.rst b/docs/api/timelapse.rst index 6a49a631d..c7f5a3767 100644 --- a/docs/api/timelapse.rst +++ b/docs/api/timelapse.rst @@ -48,7 +48,7 @@ Issue a command for an unrendered timelapse Current only supports to render the unrendered timelapse ``name`` via the ``render`` command. - Requires the ``TIMELAPSE_ADMIN`` permission. + Requires the ``TIMELAPSE_MANAGE_UNRENDERED`` permission. :json command: The command to issue, currently only ``render`` is supported @@ -64,7 +64,7 @@ Delete an unrendered timelapse Returns a :ref:`timelapse list ` in the response body. - Requires the ``TIMELAPSE_DELETE`` permission. + Requires the ``TIMELAPSE_MANAGE_UNRENDERED`` permission. :param unrendered: If provided and true, also include unrendered timelapses in the response diff --git a/docs/development/environment.rst b/docs/development/environment.rst index 6aa48b011..57a599796 100644 --- a/docs/development/environment.rst +++ b/docs/development/environment.rst @@ -61,6 +61,8 @@ When the virtual environment is activated you can then: * build the documentation running ``sphinx-build -b html . _build`` in the ``docs`` folder -- the documentation will be available in the newly created ``_build`` directory. You can simply browse it locally by opening ``index.html`` + * check whether there are newer versions of OctoPrint's dependencies available via + ``python setup.py scan_deps`` .. _sec-development-environment-source-linux: diff --git a/setup.py b/setup.py index 9bcbc97fa..ab9dd1d97 100644 --- a/setup.py +++ b/setup.py @@ -40,6 +40,7 @@ bundled_plugins = [ ] core_deps = [ "argon2_cffi>=21.3.0,<22", + "Babel>=2.12.1,<2.13", # breaking changes can happen on minor version increases "cachelib>=0.10.2,<0.11", "Click>=8.1.3,<9", "colorlog>=6.7.0,<7", @@ -69,7 +70,7 @@ core_deps = [ "semantic_version>=2.10.0,<3", "sentry-sdk>=1.16.0,<2", "tornado>=6.2,<7", - "watchdog>=2.3.0,<3", + "watchdog>=2.3.1,<3", "websocket-client>=1.5.1,<2", "werkzeug>=2.2.3,<2.3", # breaking changes can happen on minor version increases "wrapt>=1.15,<1.16", @@ -101,7 +102,7 @@ EXTRA_REQUIRES = { "ddt", "mock>=5.0.1,<6", "pytest-doctest-custom>=1.0.0,<2", - "pytest>=7.2.1,<8", + "pytest>=7.2.2,<8", # pre-commit "pre-commit", # profiler @@ -111,11 +112,11 @@ EXTRA_REQUIRES = { "plugins": ["cookiecutter>=2.1.1,<3"], # Dependencies for building the documentation "docs": [ - "readthedocs-sphinx-ext>=2.2.0,<3", - "sphinx_rtd_theme>=1.2.0,<2", - "sphinx>=6.1.3,<7", - "sphinxcontrib-httpdomain>=1.8.1,<2", - "sphinxcontrib-mermaid>=0.8.1,<0.9", + "sphinx", + "sphinxcontrib-httpdomain", + "sphinxcontrib-mermaid", + "sphinx_rtd_theme", + "readthedocs-sphinx-ext", ], } diff --git a/src/octoprint/access/permissions.py b/src/octoprint/access/permissions.py index 311f3172c..91b3fa7bb 100644 --- a/src/octoprint/access/permissions.py +++ b/src/octoprint/access/permissions.py @@ -414,7 +414,7 @@ class Permissions(metaclass=PermissionsMetaClass): ) TIMELAPSE_DELETE = OctoPrintPermission( "Timelapse Delete", - gettext("Allows to delete timelapse videos and unrendered timelapses"), + gettext("Allows to delete timelapse videos"), RoleNeed("timelapse_delete"), default_groups=[USER_GROUP], ) diff --git a/src/octoprint/static/js/app/viewmodels/timelapse.js b/src/octoprint/static/js/app/viewmodels/timelapse.js index b7ae602b9..414c2aaad 100644 --- a/src/octoprint/static/js/app/viewmodels/timelapse.js +++ b/src/octoprint/static/js/app/viewmodels/timelapse.js @@ -443,7 +443,11 @@ $(function () { }; self.removeUnrendered = function (name) { - if (!self.loginState.hasPermission(self.access.permissions.TIMELAPSE_DELETE)) + if ( + !self.loginState.hasPermission( + self.access.permissions.TIMELAPSE_MANAGE_UNRENDERED + ) + ) return; var perform = function () { @@ -463,7 +467,11 @@ $(function () { }; self.removeMarkedUnrendered = function () { - if (!self.loginState.hasPermission(self.access.permissions.TIMELAPSE_DELETE)) + if ( + !self.loginState.hasPermission( + self.access.permissions.TIMELAPSE_MANAGE_UNRENDERED + ) + ) return; var perform = function () { diff --git a/src/octoprint/templates/tabs/timelapse.jinja2 b/src/octoprint/templates/tabs/timelapse.jinja2 index 597a44222..6affc0421 100644 --- a/src/octoprint/templates/tabs/timelapse.jinja2 +++ b/src/octoprint/templates/tabs/timelapse.jinja2 @@ -194,7 +194,7 @@
{{ _('Unrendered Timelapses') }}
-
+