Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update "master" from "testing" #64

Merged
merged 16 commits into from Sep 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -12,6 +12,8 @@ Pull requests welcome ;)

[PyInventory](https://github.com/jedie/PyInventory) is a libre web-based management to catalog things including state and location etc. using Python/Django.

This package for YunoHost used the Python packeage [django-yunohost-integration](https://github.com/jedie/django_yunohost_integration)

## Screenshots

![](https://raw.githubusercontent.com/jedie/jedie.github.io/master/screenshots/PyInventory/PyInventory%20v0.2.0%20screenshot%201.png)
Expand Down
289 changes: 146 additions & 143 deletions conf/requirements.txt

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions conf/settings.py
Expand Up @@ -11,7 +11,8 @@

from pathlib import Path as __Path

from django_ynh.secret_key import get_or_create_secret as __get_or_create_secret
from django_yunohost_integration.base_settings import * # noqa
from django_yunohost_integration.secret_key import get_or_create_secret as __get_or_create_secret
from inventory_project.settings.base import * # noqa


Expand Down Expand Up @@ -40,20 +41,20 @@

SECRET_KEY = __get_or_create_secret(FINAL_HOME_PATH / 'secret.txt') # /opt/yunohost/$app/secret.txt

INSTALLED_APPS.append('django_ynh')
INSTALLED_APPS.append('django_yunohost_integration')

MIDDLEWARE.insert(
MIDDLEWARE.index('django.contrib.auth.middleware.AuthenticationMiddleware') + 1,
# login a user via HTTP_REMOTE_USER header from SSOwat:
'django_ynh.sso_auth.auth_middleware.SSOwatRemoteUserMiddleware',
'django_yunohost_integration.sso_auth.auth_middleware.SSOwatRemoteUserMiddleware',
)

# Keep ModelBackend around for per-user permissions and superuser
AUTHENTICATION_BACKENDS = (
'axes.backends.AxesBackend', # AxesBackend should be the first backend!
#
# Authenticate via SSO and nginx 'HTTP_REMOTE_USER' header:
'django_ynh.sso_auth.auth_backend.SSOwatUserBackend',
'django_yunohost_integration.sso_auth.auth_backend.SSOwatUserBackend',
#
# Fallback to normal Django model backend:
'django.contrib.auth.backends.ModelBackend',
Expand Down
2 changes: 1 addition & 1 deletion conf/setup_user.py
@@ -1,7 +1,7 @@
def setup_project_user(user):
"""
All users used the Django admin, so we need to set the "staff" user flag.
Called from django_ynh.sso_auth
Called from django_yunohost_integration.sso_auth
"""
user.is_staff = True
user.save()
Expand Down
2 changes: 1 addition & 1 deletion local_test.py
Expand Up @@ -10,7 +10,7 @@


try:
from django_ynh.local_test import create_local_test
from django_yunohost_integration.local_test import create_local_test
except ImportError as err:
raise ImportError('Did you forget to activate a virtual environment?') from err

Expand Down
17 changes: 2 additions & 15 deletions manifest.json
Expand Up @@ -5,12 +5,12 @@
"description": {
"en": "Web based management to catalog things including state and location etc."
},
"version": "0.9.2~ynh1",
"version": "0.9.4~ynh3",
"url": "https://github.com/jedie/PyInventory",
"license": "GPL-3.0",
"maintainer": {
"name": "Jens Diemer",
"email": "pyinventory_yng@jensdiemer.de"
"email": "pyinventory_ynh@jensdiemer.de"
},
"previous_maintainers": [],
"requirements": {
Expand Down Expand Up @@ -49,19 +49,6 @@
"fr": "Choisissez l'administrateur pour PyInventory"
},
"example": "johndoe"
},
{
"name": "is_public",
"type": "boolean",
"ask": {
"en": "Should PyInventory be public accessible?",
"fr": "PyInventory doit-il être accessible au public ?"
},
"help": {
"en": "Any YunoHost user and anonymous people from the web will be able to access the application",
"fr": "Tout utilisateur YunoHost et les personnes anonymes pourront accéder à l'application"
},
"default": false
}
]
}
Expand Down