New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customer index: 405 You cannot access this resource #1183
Comments
Does the target customer have domains disabled or no domains at all? Worked just fine for me, maybe I've missed something |
Same error on any customer I click, also I can't login as customer. Last customer added has a domain, email only. |
After errror, I have to clear cookies and site date from Firefox to log in again. I'm always redirected to |
Settings -> Panel settings -> Hide menu items and traffic charts in customer panel, is "Domains" selected there? |
Yes |
Okay, this option leads to the customer not being allowed to call "SubDomains.listingCount()" API method, please try the following patch: diff --git a/lib/Froxlor/CurrentUser.php b/lib/Froxlor/CurrentUser.php
index 26c836a3..211fd470 100644
--- a/lib/Froxlor/CurrentUser.php
+++ b/lib/Froxlor/CurrentUser.php
@@ -151,9 +151,13 @@ class CurrentUser
]);
$addition = $result['emaildomains'] != 0;
} elseif ($resource == 'subdomains') {
- $parentDomainCollection = (new Collection(SubDomains::class, $_SESSION['userinfo'],
- ['sql_search' => ['d.parentdomainid' => 0]]));
- $addition = $parentDomainCollection->count() != 0;
+ if (Settings::IsInList('panel.customer_hide_options', 'domains')) {
+ $addition = false;
+ } else {
+ $parentDomainCollection = (new Collection(SubDomains::class, $_SESSION['userinfo'],
+ ['sql_search' => ['d.parentdomainid' => 0]]));
+ $addition = $parentDomainCollection->count() != 0;
+ }
} elseif ($resource == 'domains') {
$customerCollection = (new Collection(Customers::class, $_SESSION['userinfo']));
$addition = $customerCollection != 0; |
Yes, it working 👍 |
Great, thanks for the feedback, very helpful :) |
…lude 'domains'; fixes #1183 Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
I have updated one system to Froxlor 2.0.2.3 and I can't access customer area from admin account.
System information
Any hints ?
The text was updated successfully, but these errors were encountered: