From 064177542eb62cb940baacabc2158fc3969a1237 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Fri, 2 Apr 2021 06:58:47 +0200 Subject: [PATCH 1/2] [core] Added license and added setup information --- LICENSE | 21 +++++++++++++++++++++ setup.cfg | 19 +++++++++++++++++++ setup.py | 6 ------ 3 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..bbcaf76 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright 2021 Tim Gröger | Flaschengeist Developers + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/setup.cfg b/setup.cfg index 6218c19..957dff3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,22 @@ +[metadata] +license = MIT +version = 2.0.0.dev0 +name = flaschengeist +author = Tim Gröger +author_email = flaschengeist@wu5.de +url = https://flaschengeist.dev +long_description = file: README.md +long_description_content_type = text/markdown +description = Modular student club administration system +project_urls = + Documentation = https://docs.flaschengeist.dev + Source = https://flaschengeist.dev/Flaschengeist/flaschengeist + Tracker = https://flaschengeist.dev/Flaschengeist/flaschengeist/issues +classifiers = + Programming Language :: Python :: 3 + License :: OSI Approved :: MIT License + Operating System :: OS Independent + [bdist_wheel] universal = True diff --git a/setup.py b/setup.py index db12c1a..d7bfd18 100644 --- a/setup.py +++ b/setup.py @@ -28,12 +28,6 @@ class DocsCommand(Command): setup( - name="flaschengeist", - version="2.0.0.dev0", - url="https://wu5.de/redmine/projects/geruecht", - author="WU5 + Friends", - author_email="tim@groeger-clan.de", - description="Does things", packages=find_packages(), package_data={"": ["*.toml"]}, scripts=["run_flaschengeist"], From 03aa7a32314ae5334277583775fccc9fb44a18e9 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sun, 4 Apr 2021 21:46:51 +0200 Subject: [PATCH 2/2] [roles] controller: Fixed setting permissions --- flaschengeist/controller/roleController.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flaschengeist/controller/roleController.py b/flaschengeist/controller/roleController.py index 501da56..a280388 100644 --- a/flaschengeist/controller/roleController.py +++ b/flaschengeist/controller/roleController.py @@ -44,12 +44,11 @@ def update_role(role, new_name): def set_permissions(role, permissions): - role.permissions.clear() for name in permissions: p = Permission.query.filter(Permission.name.in_(permissions)).all() if not p or len(p) < len(permissions): raise BadRequest("Invalid permission name >{}<".format(name)) - role.permissions.extend(p) + role.permissions = list(p) db.session.commit()