From d854b41ffb3645d98df45fab399f9bbfd28d0157 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Sun, 5 Jul 2015 00:09:13 +0200 Subject: [PATCH] Migrated access control docs from wiki --- docs/features/accesscontrol.rst | 69 +++++++++++++++++++++++++++++++ docs/features/custom_controls.rst | 16 ++++++- docs/features/index.rst | 1 + docs/features/plugins.rst | 2 +- 4 files changed, 85 insertions(+), 3 deletions(-) create mode 100644 docs/features/accesscontrol.rst diff --git a/docs/features/accesscontrol.rst b/docs/features/accesscontrol.rst new file mode 100644 index 00000000..dd59bd6b --- /dev/null +++ b/docs/features/accesscontrol.rst @@ -0,0 +1,69 @@ +.. _sec-features-access_control: + +Access Control +============== + +When Access Control is enabled, anonymous users (not logged in) will only see +the read-only parts of the UI which are the following: + + * printer state + * available gcode files and stats (upload is disabled) + * temperature + * webcam + * gcode viewer + * terminal output (sending commands is disabled) + * available timelapse movies + * any components provided through plugins which are enabled for anonymous + users + +Logged in users will get access to everything besides the Settings and System +Commands, which are admin-only. + +If Access Control is disabled, everything is directly accessible. **That also +includes all administrative functionality as well as full control over the +printer!** + +Upon first start a configuration wizard is provided which allows configuration +of the first administrator account or alternatively disabling Access Control +(which is **NOT** recommended for systems that are directly accessible via the +Internet!). + +.. hint:: + + If you plan to have your OctoPrint instance accessible over the internet, + **always enable Access Control**. + +.. _sec-features-access_control-rerunning_wizard: + +Rerunning the wizard +-------------------- + +In case Access Control was disabled in the configuration wizard, it is +possibly to re-run it by editing ``config.yaml`` [#f1]_ and setting ``firstRun`` +in the ``server`` section and ``enabled`` in the ``accessControl`` section to +``true``: + +.. code-block-ext:: yaml + + accessControl: + enabled: true + # ... + server: + firstRun: true + +Then restart the server and connect to the web interface - the wizard should +be shown again. + +.. note:: + + If user accounts were created prior to disabling Access Control and those + user accounts are not to be used any more, remove ``.octoprint/users.yaml``. + If you don't remove this file, the above changes won't lead to the + configuration being shown again, instead Access Control will just be + enabled using the already existing login data. This is to prevent you from + resetting access control by accident. + +.. rubric:: Footnotes + +.. [#f1] For Linux that will be ``~/.octoprint/config.yaml``, for Windows it will be ``%APPDATA%/OctoPrint/config.yaml`` and for + Mac ``~/Library/Application Support/OctoPrint/config.yaml`` diff --git a/docs/features/custom_controls.rst b/docs/features/custom_controls.rst index a904748f..983611fc 100644 --- a/docs/features/custom_controls.rst +++ b/docs/features/custom_controls.rst @@ -10,7 +10,7 @@ buttons which trigger sending of one or more lines of GCODE to the printer over parameterization of these commands with values entered by the user to full blown GCODE script templates backed by `Jinja2 `_. -Custom controls are configured within :ref:`config.yaml ` in a ``controls`` section which +Custom controls are configured within :ref:`config.yaml ` [#f1]_ in a ``controls`` section which basically represents a hierarchical structure of all configured custom controls of various types. .. note:: @@ -94,6 +94,13 @@ button that sends one or more commands to the printer when clicked, displaying o controls that just serve as *container* for other controls, the latter being identified by having a ``children`` attribute wrapping more controls. +.. hint:: + + Take a look at the `Custom Control Editor plugin `_ + which allows you configuring your Custom Controls through OctoPrint's + settings interface without the need to manually edit the configuration + file. + .. _sec-features-custom_controls-types: Types @@ -278,4 +285,9 @@ Parameterized GCODE Script G28 X0 Y0 Note the usage of the ``parameters.repetitions`` template variable in the GCODE script template, which will contain -the value selected by the user for the "Go arounds" slider. \ No newline at end of file +the value selected by the user for the "Go arounds" slider. + +.. rubric:: Footnotes + +.. [#f1] For Linux that will be ``~/.octoprint/config.yaml``, for Windows it will be ``%APPDATA%/OctoPrint/config.yaml`` and for + Mac ``~/Library/Application Support/OctoPrint/config.yaml`` diff --git a/docs/features/index.rst b/docs/features/index.rst index 5ebc8620..c4b1a713 100644 --- a/docs/features/index.rst +++ b/docs/features/index.rst @@ -7,6 +7,7 @@ Features .. toctree:: :maxdepth: 2 + accesscontrol.rst custom_controls.rst gcode_scripts.rst action_commands.rst diff --git a/docs/features/plugins.rst b/docs/features/plugins.rst index c8fb1fd5..1b65b6dc 100644 --- a/docs/features/plugins.rst +++ b/docs/features/plugins.rst @@ -64,7 +64,7 @@ See :ref:`Developing Plugins `. .. rubric:: Footnotes .. [#f1] For Linux that will be ``~/.octoprint/plugins``, for Windows it will be ``%APPDATA%/OctoPrint/plugins`` and for - Mac ``~/Library/Application Support/OctoPrint`` + Mac ``~/Library/Application Support/OctoPrint/plugins`` .. [#f2] Make sure to use the exact same Python installation for installing the plugin that you also used for installing & running OctoPrint. For OctoPi this means using ``~/oprint/bin/pip`` for installing plugins instead of just ``pip``.