[PoC] Password-Based user roles and triggers/actions (or how to use different passwords for multiple roles for the same account)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bootstrap
config
database
public
resources
routes
storage
tests
.env
.env.example
.gitattributes
.gitignore
README.md
artisan
composer.json
composer.lock
package.json
phpunit.xml
server.php
webpack.mix.js
yarn.lock

README.md

Password Based Roles and Actions (PoC)

this demo project shows how we can implement a password based roles and actions system.

How to install

  • clone the repo and create a new database
  • edit .env file and update the following
DB_DATABASE=DB_NAME
DB_USERNAME=DB_USERNAME
DB_PASSWORD=DB_PASSWORD
  • install the dependencies of the demo
cd password-based-roles-actions
composer install

-after the installation ends, you can view the launch the demo:

php artisan serve

and then visit http://127.0.0.1:8000

How to test

  • Register a new account
  • Login click on your username (upper right corner), and create new sub-account (all what you have to do is choose passwords for the restricted and trigger account).
  • Logout and try to login with the email address you used to register and the "restricted account" password, you should see now a different welcome message (it means that you are inside the restricted account).
  • Logout and login one more time with the trigger password this time, you'll see a different welcome page as well.
  • logout and try to login again, you'll see an error message (the account was disabled since you logged in with the trigger account in the previous step).