/LaraPersonate

Login as a different user quickly

Primary LanguagePHPMIT LicenseMIT

Demonstration

Lara Personate

Is a user impersonate for the laravel framework. allow a developer direct login as another user during development inspired by sudo-su.

Features

  • Displays users based their role.
  • Limit the number of users displayed.
  • Search form using tail.select.
  • Auto discovery, no more setting up your ServiceProvider manually.
  • Automatic injection via a middleware, no need to add some code to the blade.

Installation

To install the package, simply follow the steps below.

Install the package using Composer:

$ composer require supianidz/laravel-impersonate --dev

$ php artisan vendor:publish

Lara Personate 1.2.x Upgrade Guide

Since there are many changes in the config and assets files in version 1.2.0, make sure to republish the package.

$ php artisan vendor:publish

And that's it!

Configuration

After running vendor:publish, a config file called impersonate.php should appear in your project.

Disclaimer - DANGER !

This package can pose a serious security issue if used incorrectly, as anybody will be able to take control of any user's account. Please ensure that the service provider is only registered when the app is in a debug/local environment.

By default, the package will disable itself on any domains that don't have a TLD of .dev or .local. This is a security measure to reduce the risk of accidentally enabling the package in production.

By using this package, you agree that Octopy ID and the contributors of this package cannot be held responsible for any damages caused by using this package.

Security

If you discover any security related issues, please email supianidz@gmail.com or me@octopy.id instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

To Do

  • Unit tests
  • UI improvement
  • Showing users with their role based on 3rd library like Laratrust, Bouncer and others.

Change Logs

v1.2.2

  • Exclude Lara Personate from json response.

v1.2.1

  • Exclude Lara Personate from ajax requests.

v1.2.0

  • Rewrite code.
  • Added sign out button.
  • Added a new feature to display users by the role according to third party packages.

v1.1.0

  • Add custom fields for user_model.
  • Rename package, from laravel-sudo to laravel-impersonate.

v1.0.0

  • Initial Release.