Skip to content
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

Cannot open or edit lead as a user other than admin #2015

Open
clonefunnels opened this issue Feb 14, 2025 · 1 comment
Open

Cannot open or edit lead as a user other than admin #2015

clonefunnels opened this issue Feb 14, 2025 · 1 comment

Comments

@clonefunnels
Copy link

clonefunnels commented Feb 14, 2025

Bug report

Title

When you click on a lead it gets an error: Undefined variable $userIds

It doesn't do this for the main admin. Only for other users.

Preconditions

Please provide as detailed information about your environment as possible.

1. framework Version  2.0.5
2. Commit id. Don't know

Steps to reproduce

It is important to provide a set of clear steps to reproduce this bug.If relevant please include code samples.

1. Login as user other than admin
2. Click on a lead

Expected result

It should open the lead like it does for admin.

https://www.youtube.com/watch?v=vpddlxSJatk

Actual result

Undefined variable $userIds

@clonefunnels
Copy link
Author

I temporarily resolved it by removing this:

 if (
        $userIds = bouncer()->getAuthorizedUserIds()
        && ! in_array($lead->user_id, $userIds)
    ) {
        return redirect()->route('admin.leads.index');
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant