-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into feat/occhab-check
- Loading branch information
Showing
31 changed files
with
482 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule UsersHub
updated
5 files
+11 −8 | app/app.py | |
+1 −1 | dependencies/UsersHub-authentification-module | |
+1 −1 | requirements-dependencies.in | |
+3 −3 | requirements-dev.txt | |
+4 −4 | requirements.txt |
Submodule UsersHub-authentification-module
updated
6 files
+4 −2 | README.md | |
+1 −1 | VERSION | |
+25 −0 | docs/changelog.rst | |
+20 −18 | requirements-dev.txt | |
+16 −14 | requirements.txt | |
+2 −2 | src/pypnusershub/routes_register.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
import os | ||
from apptax.admin.admin_view import ( | ||
BibListesView, | ||
TaxrefView, | ||
TMediasView, | ||
BibAttributsView, | ||
BibThemesView, | ||
) | ||
from geonature.utils.env import db | ||
|
||
from apptax.admin.admin import adresses | ||
from apptax.taxonomie.models import Taxref, BibListes, TMedias, BibAttributs, BibThemes | ||
from geonature.core.admin.utils import CruvedProtectedMixin | ||
|
||
|
||
class CruvedProtectedBibListesView(CruvedProtectedMixin, BibListesView): | ||
module_code = "TAXHUB" | ||
object_code = "LISTE" | ||
extra_actions_perm = {".import_cd_nom_view": "C"} | ||
|
||
|
||
class CruvedProtectedTaxrefView(CruvedProtectedMixin, TaxrefView): | ||
module_code = "TAXHUB" | ||
object_code = "TAXON" | ||
|
||
|
||
class CruvedProtectedTMediasView(CruvedProtectedMixin, TMediasView): | ||
module_code = "TAXHUB" | ||
object_code = "TAXON" | ||
|
||
|
||
class CruvedProtectedBibAttributsView(CruvedProtectedMixin, BibAttributsView): | ||
module_code = "TAXHUB" | ||
object_code = "ATTRIBUT" | ||
|
||
|
||
class CruvedProtectedBibThemes(CruvedProtectedMixin, BibThemesView): | ||
module_code = "TAXHUB" | ||
object_code = "THEME" | ||
|
||
|
||
def load_admin_views(app, admin): | ||
static_folder = os.path.join(adresses.root_path, "static") | ||
|
||
admin.add_view( | ||
CruvedProtectedTaxrefView( | ||
Taxref, | ||
db.session, | ||
name="Taxref", | ||
endpoint="taxons", | ||
category="TaxHub", | ||
static_folder=static_folder, | ||
) | ||
) | ||
admin.add_view( | ||
CruvedProtectedBibListesView( | ||
BibListes, | ||
db.session, | ||
name="Listes", | ||
category="TaxHub", | ||
static_folder=static_folder, | ||
) | ||
) | ||
|
||
admin.add_view( | ||
CruvedProtectedBibAttributsView( | ||
BibAttributs, | ||
db.session, | ||
name="Attributs", | ||
category="TaxHub", | ||
static_folder=static_folder, | ||
) | ||
) | ||
admin.add_view( | ||
CruvedProtectedBibThemes( | ||
BibThemes, | ||
db.session, | ||
name="Thèmes", | ||
category="TaxHub", | ||
static_folder=static_folder, | ||
) | ||
) | ||
|
||
admin.add_view( | ||
CruvedProtectedTMediasView( | ||
TMedias, | ||
db.session, | ||
name="Médias", | ||
category="TaxHub", | ||
static_folder=static_folder, | ||
) | ||
) |
Oops, something went wrong.