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

Creating clients & administrator roles #11

Open
sb-github opened this issue Jan 10, 2018 · 2 comments
Open

Creating clients & administrator roles #11

sb-github opened this issue Jan 10, 2018 · 2 comments
Assignees

Comments

@sb-github
Copy link
Owner

Creating user roles will allow the user with administrative rights to change the balance and edit the information of other users.

UI:

• Clients -
• Administrator -

Data Structure:

Edit:

Add:

Create 4 new tables with migration from previous admin module Yii2-RBCA.
auth_item - this table stores roles and permissions.
auth_item_child - inheritance.
auth_assignment - position.
auth_rule - class rule names.

Logic or Flow information:

33324240-b56a8b9e-d457-11e7-8ce0-cccb7413ebb5

@wwwadminwww
Copy link
Collaborator

wwwadminwww commented Jan 18, 2018

Configuration for add roles manager:

  1. Run this command for install RBAC extension: composer update
  2. Add rbac module to web application config file as follows:
		...
		'modules' => [
		    ...
		    'rbac' => 'dektrium\rbac\RbacConsoleModule',
		    ...
		],
		...
  1. Add rbac module to console application config file as follows:
		...
		'modules' => [
		    ...
		    'rbac' => 'dektrium\rbac\RbacConsoleModule',
		    ...
		],
		...
  1. After you downloaded and configured Yii2-rbac, the last thing you need to do is updating your database schema by applying the migration:
    Run this command:
php yii migrate/up --migrationPath=@yii/rbac/migrations

@wwwadminwww
Copy link
Collaborator

wwwadminwww commented Jan 18, 2018

When you finished with configuraion do this steps:

  1. Open terminal in you project folder
  2. Run this command to create basic roles: php yii roles/create-basic-roles
  3. Now you need assign role to some user.
    For this run this command and follow to instructions: php yii roles/assign-role-to-user
  4. If you want remove some role from some user.
    Run this command and follow to instructions: php yii roles/revoke-role-from-user
    Now you can login in website.

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

2 participants