From c96ab426a417e603282de95f9db2e520ac73f2ba Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 21 Feb 2020 12:36:11 -0600 Subject: [PATCH] Return new user permissions when logging in via API --- tailbone/api/auth.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tailbone/api/auth.py b/tailbone/api/auth.py index 05123818..63a47ed8 100644 --- a/tailbone/api/auth.py +++ b/tailbone/api/auth.py @@ -26,7 +26,7 @@ Tailbone Web API - Auth Views from __future__ import unicode_literals, absolute_import -from rattail.db.auth import authenticate_user, set_user_password +from rattail.db.auth import authenticate_user, set_user_password, cache_permissions from tailbone.api import APIView, api from tailbone.db import Session @@ -84,6 +84,7 @@ class AuthenticationView(APIView): return { 'ok': True, 'user': self.get_user_info(user), + 'permissions': list(cache_permissions(Session(), user)), } def authenticate_user(self, username, password):