diff --git a/tailbone/api/auth.py b/tailbone/api/auth.py index ea1a4c8f..d85f2fb1 100644 --- a/tailbone/api/auth.py +++ b/tailbone/api/auth.py @@ -53,9 +53,12 @@ class AuthenticationView(APIView): This will establish a server-side web session for the user if none exists. Note that this also resets the user's session timer. """ + data = {'ok': True} if self.request.user: - return self.user_info(self.request.user) - return {} + data = self.user_info(self.request.user) + data['user']['is_root'] = self.request.is_root + data['permissions'] = list(self.request.tailbone_cached_permissions) + return data @api def login(self):