Code source de geonature.core.gn_permissions.routes
"""Routes of the gn_permissions blueprint"""importjsonfromcopyimportcopyfromflaskimportBlueprint,request,Response,render_template,sessionfromgeonature.utils.envimportDBfromsqlalchemy.ormimportjoinedloadfromutils_flask_sqla.responseimportjson_respfromgeonature.core.gn_commons.modelsimportTModulesfromgeonature.core.gn_permissionsimportdecoratorsaspermissionsfromgeonature.core.gn_permissions.commandsimportsupergrant
[docs]deflogout():""" Route to logout with cruved .. :quickref: Permissions; To avoid multiples server call, we store the cruved in the session when the user logout we need clear the session to get the new cruved session """copy_session_key=copy(session)forkeyincopy_session_key:session.pop(key)returnResponse("Logout",200)