diff --git a/advlabdb/templates/macros.html b/advlabdb/templates/macros.html index 190837d..15cd6f3 100644 --- a/advlabdb/templates/macros.html +++ b/advlabdb/templates/macros.html @@ -1,4 +1,11 @@ {% macro information(current_user, userActiveSemester, role) %} -User: {{current_user.repr()}}; Active -semester: {{userActiveSemester(flashWarning=True).repr()}}. +User: {{current_user.repr()}} + +| Active semester: {{userActiveSemester(flashWarning=True).repr()}} + +{% if (role == "admin") and (current_user.has_role("assistant")) %} +| Assistant space. +{% elif (role == "assistant") and (current_user.has_role("admin")) %} +| Admin space. +{% endif %} {% endmacro %} \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index 007e726..053f0d6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -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"}, diff --git a/pyproject.toml b/pyproject.toml index d86e1e9..fb274a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,18 +6,18 @@ authors = ["Mohamad Bitar "] 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"]