Skip to content

Commit 102c0d0

Browse files
authored
Merge branch 'master' into issues/1049-send-generic-message
2 parents b645661 + 2177fea commit 102c0d0

31 files changed

Lines changed: 401 additions & 110 deletions

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ jobs:
3535
django-version: django~=4.2.0
3636

3737
steps:
38-
- uses: actions/checkout@v5
38+
- uses: actions/checkout@v6
3939
with:
4040
ref: ${{ github.event.pull_request.head.sha }}
4141

4242
- name: Cache APT packages
43-
uses: actions/cache@v4
43+
uses: actions/cache@v5
4444
with:
4545
path: /var/cache/apt/archives
4646
key: apt-${{ runner.os }}-${{ hashFiles('.github/workflows/ci.yml') }}

.github/workflows/publiccode-yml-validation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
publiccode_yml_validation:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v5
9+
- uses: actions/checkout@v6
1010
- uses: italia/publiccode-parser-action@v1
1111
with:
1212
publiccode: "publiccode.yml"

.github/workflows/pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
permissions:
1818
id-token: write
1919
steps:
20-
- uses: actions/checkout@v5
20+
- uses: actions/checkout@v6
2121
- name: Set up Python
2222
uses: actions/setup-python@v6
2323
with:

docs/developer/extending.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ a field ``social_security_number`` in the `sample_users/models.py
3737

3838
Firstly, to get started you need to create a django project:
3939

40-
.. code-block::
40+
.. code-block:: bash
4141
4242
django-admin startproject mycontroller
4343
@@ -55,7 +55,7 @@ of python scripts), in the following examples we'll call these django app
5555
``sample_config``, ``sample_pki``, ``sample_connection``, ``sample_geo`` &
5656
``sample_subnet_division``. but you can name it how you want:
5757

58-
.. code-block::
58+
.. code-block:: bash
5959
6060
django-admin startapp sample_config
6161
django-admin startapp sample_pki
@@ -77,7 +77,7 @@ apps, please refer to the `django documentation
7777

7878
Install (and add to the requirement of your project) openwisp-controller:
7979

80-
.. code-block::
80+
.. code-block:: bash
8181
8282
pip install openwisp-controller
8383
@@ -364,7 +364,7 @@ step 1.
364364

365365
Create database migrations:
366366

367-
.. code-block::
367+
.. code-block:: bash
368368
369369
./manage.py makemigrations
370370
@@ -385,7 +385,7 @@ make a migrations file which would look like:
385385

386386
Create database migrations:
387387

388-
.. code-block::
388+
.. code-block:: bash
389389
390390
./manage.py migrate
391391
@@ -723,7 +723,7 @@ For running the tests, you need to copy fixtures as well:
723723

724724
You can then run tests with:
725725

726-
.. code-block::
726+
.. code-block:: bash
727727
728728
# the --parallel flag is optional
729729
./manage.py test --parallel mycontroller

docs/developer/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ Unable to Load SpatiaLite library Extension?
166166

167167
If you are incurring in the following exception:
168168

169-
.. code-block::
169+
.. code-block:: text
170170
171171
django.core.exceptions.ImproperlyConfigured: Unable to load the SpatiaLite library extension
172172

docs/index.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ Controller
66
**Source code**: `github.com/openwisp/openwisp-controller
77
<https://github.com/openwisp/openwisp-controller>`_.
88

9-
OpenWISP Controller is responsible of of managing the core resources of
10-
the network and allows automating several aspects like adoption,
11-
provisioning, VPN tunnel configuration, generation of X509 certificates,
12-
subnet and IP address allocation and more.
9+
OpenWISP Controller is responsible for managing the core resources of the
10+
network and allows automating several aspects like adoption, provisioning,
11+
VPN tunnel configuration, generation of X509 certificates, subnet and IP
12+
address allocation and more.
1313

1414
For a full introduction please refer to :doc:`user/intro`.
1515

docs/user/import-export.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ needed, for example, the following CSV file will import a device named
1616
``TestImport`` with mac address ``00:11:22:09:44:55`` in the organization
1717
with UUID ``3cb5e18c-0312-48ab-8dbd-038b8415bd6f``:
1818

19-
.. code-block::
19+
.. code-block:: text
2020
2121
organization,name,mac_address
2222
3cb5e18c-0312-48ab-8dbd-038b8415bd6f,TestImport,00:11:22:09:44:55

docs/user/openvpn.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ After installing both Ansible and Git, install the required roles:
6565
Create an Ansible inventory file named ``inventory`` **on your local
6666
machine** (not on the server) with the following contents:
6767

68-
.. code-block::
68+
.. code-block:: ini
6969
7070
[openvpn]
7171
your_server_domain_or_ip
7272
7373
For example, if your server IP is ``192.168.56.2``:
7474

75-
.. code-block::
75+
.. code-block:: ini
7676
7777
[openvpn]
7878
192.168.56.2

docs/user/templates.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ device registers in the system.
165165

166166
Here's the sample ``/etc/config/openwisp`` configuration for mesh devices:
167167

168-
.. code-block::
168+
.. code-block:: ini
169169
170170
config controller 'http'
171171
option url 'https://openwisp2.mynetwork.com'
@@ -184,7 +184,7 @@ assigned to them.
184184
The sample ``/etc/config/openwisp`` configuration for dumb access points
185185
is the following:
186186

187-
.. code-block::
187+
.. code-block:: ini
188188
189189
config controller 'http'
190190
option url 'https://openwisp2.mynetwork.com'

openwisp_controller/config/base/channels_consumer.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,7 @@ class BaseDeviceConsumer(WebsocketConsumer):
1010
channel_layer_group = "config.device"
1111

1212
def _is_user_authenticated(self):
13-
try:
14-
assert self.scope["user"].is_authenticated is True
15-
except (KeyError, AssertionError):
16-
self.close()
17-
return False
18-
else:
19-
return True
13+
return self.scope["user"].is_authenticated is True
2014

2115
def is_user_authorized(self):
2216
user = self.scope["user"]

0 commit comments

Comments
 (0)