Merge remote-tracking branch 'origin/develop' into feature/pricelist

This commit is contained in:
Tim Gröger 2021-04-15 15:36:00 +02:00
commit 2da0bb1683
4 changed files with 41 additions and 8 deletions

21
LICENSE Normal file
View File

@ -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.

View File

@ -44,12 +44,11 @@ def update_role(role, new_name):
def set_permissions(role, permissions): def set_permissions(role, permissions):
role.permissions.clear()
for name in permissions: for name in permissions:
p = Permission.query.filter(Permission.name.in_(permissions)).all() p = Permission.query.filter(Permission.name.in_(permissions)).all()
if not p or len(p) < len(permissions): if not p or len(p) < len(permissions):
raise BadRequest("Invalid permission name >{}<".format(name)) raise BadRequest("Invalid permission name >{}<".format(name))
role.permissions.extend(p) role.permissions = list(p)
db.session.commit() db.session.commit()

View File

@ -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] [bdist_wheel]
universal = True universal = True

View File

@ -28,12 +28,6 @@ class DocsCommand(Command):
setup( 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(), packages=find_packages(),
package_data={"": ["*.toml"]}, package_data={"": ["*.toml"]},
scripts=["run_flaschengeist"], scripts=["run_flaschengeist"],