mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-11-08 21:21:06 +00:00
Added link to other space if user has both roles
This commit is contained in:
parent
a4a835a5e7
commit
5a03a558c8
3 changed files with 20 additions and 12 deletions
|
@ -1,4 +1,11 @@
|
|||
{% macro information(current_user, userActiveSemester, role) %}
|
||||
User: <a href="{{url_for('index')}}{{role}}/user/details/?id={{current_user.id}}">{{current_user.repr()}}</a>; Active
|
||||
semester: {{userActiveSemester(flashWarning=True).repr()}}.
|
||||
User: <a href="{{url_for('index')}}{{role}}/user/details/?id={{current_user.id}}">{{current_user.repr()}}</a>
|
||||
|
||||
| Active semester: {{userActiveSemester(flashWarning=True).repr()}}
|
||||
|
||||
{% if (role == "admin") and (current_user.has_role("assistant")) %}
|
||||
| <a href="{{url_for('index')}}assistant">Assistant space</a>.
|
||||
{% elif (role == "assistant") and (current_user.has_role("admin")) %}
|
||||
| <a href="{{url_for('index')}}admin">Admin space</a>.
|
||||
{% endif %}
|
||||
{% endmacro %}
|
11
poetry.lock
generated
11
poetry.lock
generated
|
@ -340,14 +340,14 @@ python-versions = "*"
|
|||
|
||||
[[package]]
|
||||
name = "rope"
|
||||
version = "0.19.0"
|
||||
version = "0.22.0"
|
||||
description = "a python refactoring library..."
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
|
||||
[package.extras]
|
||||
dev = ["pytest"]
|
||||
dev = ["build", "pytest", "pytest-timeout"]
|
||||
|
||||
[[package]]
|
||||
name = "sqlalchemy"
|
||||
|
@ -424,8 +424,8 @@ email = ["email-validator"]
|
|||
|
||||
[metadata]
|
||||
lock-version = "1.1"
|
||||
python-versions = "^3.9"
|
||||
content-hash = "cbd384282803742bf8329353f02d15b5512c5ce72eb075cc1c3158045b9e50df"
|
||||
python-versions = "^3.10"
|
||||
content-hash = "7af5fe05c787894cba9c757b0d2838f6fe365e340e36cb841ce40dbccfd5431f"
|
||||
|
||||
[metadata.files]
|
||||
black = [
|
||||
|
@ -725,7 +725,8 @@ regex = [
|
|||
{file = "regex-2021.11.10.tar.gz", hash = "sha256:f341ee2df0999bfdf7a95e448075effe0db212a59387de1a70690e4acb03d4c6"},
|
||||
]
|
||||
rope = [
|
||||
{file = "rope-0.19.0.tar.gz", hash = "sha256:64e6d747532e1f5c8009ec5aae3e5523a5bcedf516f39a750d57d8ed749d90da"},
|
||||
{file = "rope-0.22.0-py3-none-any.whl", hash = "sha256:2847220bf72ead09b5abe72b1edc9cacff90ab93663ece06913fc97324167870"},
|
||||
{file = "rope-0.22.0.tar.gz", hash = "sha256:b00fbc064a26fc62d7220578a27fd639b2fad57213663cc396c137e92d73f10f"},
|
||||
]
|
||||
sqlalchemy = [
|
||||
{file = "SQLAlchemy-1.4.27-cp27-cp27m-macosx_10_14_x86_64.whl", hash = "sha256:6afa9e4e63f066e0fd90a21db7e95e988d96127f52bfb298a0e9bec6999357a9"},
|
||||
|
|
|
@ -6,18 +6,18 @@ authors = ["Mohamad Bitar <mohamad.bit@protonmail.com>"]
|
|||
readme = "README.md"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.9"
|
||||
Flask = ">=2.0.1"
|
||||
python = "^3.10"
|
||||
Flask = ">=2.0.2"
|
||||
Flask-SQLAlchemy = ">=2.5.1"
|
||||
Flask-WTF = ">=0.15.1"
|
||||
Flask-Security-Too = ">=4.0.1"
|
||||
Flask-WTF = ">=1.0.0"
|
||||
Flask-Security-Too = ">=4.1.2"
|
||||
Flask-Admin = ">=1.5.8"
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
flake8 = "*"
|
||||
black = "*"
|
||||
isort = "*"
|
||||
rope = "^0.19.0"
|
||||
rope = "*"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
|
|
Loading…
Reference in a new issue