From 862bdefd58def3912b5d39a9a58d9ecdc9a703ad Mon Sep 17 00:00:00 2001 From: root Date: Thu, 26 Aug 2021 12:37:36 +0200 Subject: [PATCH 1/4] Fixed alloweds --- api/src/api/views/decorators.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/api/src/api/views/decorators.py b/api/src/api/views/decorators.py index 1afb00a3a..c4375f597 100644 --- a/api/src/api/views/decorators.py +++ b/api/src/api/views/decorators.py @@ -121,9 +121,19 @@ def allowedTemplateId(payload,template_id): alloweds=template['allowed'] if payload['role_id'] == 'admin': return True if payload['role_id'] == 'manager' and payload['category_id'] == template['category']: return True - if alloweds['categories'] and payload['category_id'] in alloweds['categories']: return True - if alloweds['groups'] and payload['group_id'] in alloweds['groups']: return True - if alloweds['users'] and payload['user_id'] in alloweds['users']: return True + if alloweds['roles'] != False: + print(alloweds['roles']) + if alloweds['roles'] == []: return True + if payload['role_id'] in alloweds['roles']: return True + if alloweds['categories'] != False: + if alloweds['categories'] == []: return True + if payload['category_id'] in alloweds['categories']: return True + if alloweds['groups'] != False: + if alloweds['groups'] == []: return True + if payload['group_id'] in alloweds['groups']: return True + if alloweds['users'] != False: + if alloweds['groups'] == []: return True + if payload['user_id'] in alloweds['users']: return True return False # def allowedId(payload,category_id, alloweds): From 2547e4d0ce73be9bbb38e77132df7110140fca89 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 26 Aug 2021 13:00:30 +0200 Subject: [PATCH 2/4] Fixed temporary desktops --- api/src/api/libv2/api_socketio_domains.py | 3 ++- api/src/api/views/decorators.py | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/api/libv2/api_socketio_domains.py b/api/src/api/libv2/api_socketio_domains.py index 186cf127e..656f7731c 100644 --- a/api/src/api/libv2/api_socketio_domains.py +++ b/api/src/api/libv2/api_socketio_domains.py @@ -86,7 +86,8 @@ def run(self): data=c['old_val'] else: if not c['new_val']['id'].startswith('_'): continue - if c['new_val']['status'] not in ['Creating','Shutting-down','Stopping','Stopped','Starting','Started','Failed']: continue + if c['new_val']['status'] not in ['Creating','CreatingAndStarting','Shutting-down','Stopping','Stopped','Starting','Started','Failed']: continue + if c['new_val']['kind'] != 'desktop': item='template' else: diff --git a/api/src/api/views/decorators.py b/api/src/api/views/decorators.py index c4375f597..8dcb95715 100644 --- a/api/src/api/views/decorators.py +++ b/api/src/api/views/decorators.py @@ -122,7 +122,6 @@ def allowedTemplateId(payload,template_id): if payload['role_id'] == 'admin': return True if payload['role_id'] == 'manager' and payload['category_id'] == template['category']: return True if alloweds['roles'] != False: - print(alloweds['roles']) if alloweds['roles'] == []: return True if payload['role_id'] in alloweds['roles']: return True if alloweds['categories'] != False: From 5997723bee87f05871e93d08a38f2351cd951649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?darta=C2=B7?= Date: Thu, 26 Aug 2021 21:32:42 +0200 Subject: [PATCH 3/4] Removed old BACKEND variables --- isardvdi.cfg.example | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/isardvdi.cfg.example b/isardvdi.cfg.example index 118cd1c8f..da8ad7949 100644 --- a/isardvdi.cfg.example +++ b/isardvdi.cfg.example @@ -227,35 +227,6 @@ AUTHENTICATION_DB_HOST=isard-db ###################### BACKEND config BACKEND_HOST=localhost -BACKEND_REDIS_HOST=isard-redis -BACKEND_REDIS_PASSWORD= -BACKEND_AUTH_AUTOREGISTRATION=true - -## Github Login -# Create your Github OAuth credentials at https://github.com/settings/developers -# Homepage URL: https://domain.tld -# Authorization callback URL: https://domain.tld/callback/github -# Change BACKEND_HOST to domain.tld -# BACKEND_AUTH_GITHUB_HOST=api.github.com -# BACKEND_AUTH_GITHUB_ID=id -# BACKEND_AUTH_GITHUB_SECRET=secret - -## Google Login -# Create your Google OAUTH credentials at https://console.developers.google.com/apis/credentials -# Authorized redirect URIs: https://domain.tld/callback/google -# Change BACKEND_HOST to domain.tld -# BACKEND_AUTH_GOOGLE_ID=id -# BACKEND_AUTH_GOOGLE_SECRET=secret - -# BACKEND_AUTH_SAML_CERT_PATH=/keys/saml.cert -# BACKEND_AUTH_SAML_KEY_PATH=/keys/saml.key -# BACKEND_AUTH_SAML_IDP_URL=https:// -# BACKEND_AUTH_SAML_ATTR_ID=uid -# BACKEND_AUTH_SAML_ATTR_NAME=displayName -BACKEND_ISARD_API_HOST=isard-api -BACKEND_MANTEINANCE_ADMINS=admin # VIDEO config ########################################################### From 1fd8b64bb3927547acd34df8f30d4821a50549a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9fix=20Estrada?= Date: Fri, 27 Aug 2021 09:48:10 +0200 Subject: [PATCH 4/4] Prepare for release v3.0.1 --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c5bc091c..e01a04efd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ All notable changes to this project will be documented in this file. +## [3.0.1] - 2021-08-27 + +### Fixed + +- Temporary desktops didn't start +- Some temporary desktops logout user as the allowed filter had a bug + +### Removed + +- Removed unused BACKEND variables from isardvdi.cfg + ## [3.0.0] - 2021-08-25 | Gran Paradiso *Note*: it is possible to upgrade from version `2.0.0-rc1` to `3.0.0`, but we don't assure you everything will work (though it probably will). For a stable installation, start from scratch.