Refactor API permissions and throttling: Updated default permission classes to enforce authentication and tenant access. Introduced new permission for system accounts and developers. Enhanced throttling rates for various operations to reduce false 429 errors. Improved API key loading logic to prioritize account-specific settings, with fallbacks to system accounts and Django settings. Updated integration views and sidebar to reflect new permission structure.
This commit is contained in:
@@ -88,7 +88,7 @@ const getAuthToken = (): string | null => {
|
||||
}
|
||||
|
||||
// Fallback to localStorage (for cases where store hasn't initialized yet)
|
||||
const authStorage = localStorage.getItem('auth-storage');
|
||||
const authStorage = localStorage.getItem('auth-store');
|
||||
if (authStorage) {
|
||||
const parsed = JSON.parse(authStorage);
|
||||
return parsed?.state?.token || null;
|
||||
@@ -109,7 +109,7 @@ const getRefreshToken = (): string | null => {
|
||||
}
|
||||
|
||||
// Fallback to localStorage (for cases where store hasn't initialized yet)
|
||||
const authStorage = localStorage.getItem('auth-storage');
|
||||
const authStorage = localStorage.getItem('auth-store');
|
||||
if (authStorage) {
|
||||
const parsed = JSON.parse(authStorage);
|
||||
return parsed?.state?.refreshToken || null;
|
||||
|
||||
Reference in New Issue
Block a user