GithubHelp home page GithubHelp logo

githubjeka / gui-rbac-yii2 Goto Github PK

View Code? Open in Web Editor NEW
84.0 18.0 38.0 127 KB

GUI for RBAC Yii2 Auth manager

Home Page: https://basic-rbac-githubjeka.c9.io/basic/web/index.php?r=rbac

PHP 57.53% CSS 3.26% JavaScript 39.21%
rbac yii2

gui-rbac-yii2's Introduction

Total Downloads Build Status

http://i.imgur.com/BXTKymp.jpg

How to install

๐Ÿค Follow the commands:

  • Check that the component authManager has been configured.
  • Add to your composer.json "githubjeka/yii2-gui-rbac": "1.0.2"
  • Run composer update
  • If your project doesn't have to implement rbac then run yii migrate --migrationPath=@yii/rbac/migrations/
  • Add to @app/config/main.php the code:
// '/config/web.php' for Basic or '/backend/config/main' - Advanced Yii2 application.
'modules' => [
  'rbac' => [
    'class' => 'githubjeka\rbac\Module',
    'as access' => [ // if you need to set access
      'class' => 'yii\filters\AccessControl',
      'rules' => [
          [
              'allow' => true,
              'roles' => ['@'] // all auth users 
          ],
      ]
    ]
  ],
],
  • go to url /index.php?r=rbac

gui-rbac-yii2's People

Contributors

bscheshirwork avatar githubjeka avatar robote13 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gui-rbac-yii2's Issues

Rbac test error

Hello,

I am getting this "Call to a member function getRules() on a non-object" when I go to http://admin.app.dev/rbac

Please have a look at my screen and advice what I could be doing wrong, I believe I have followed the instructions you provided.

Regards,

Adam

screen shot 2015-05-07 at 10 02 24 pm

Cannot create new roles or permissions

Cannot create new permissions or roles using the crud, there is an error in the ItemController line 84

isset($_POST['ItemForm']['oldName']) is always true as its a string maybe an additional check of && $_POST['ItemForm']['oldName']!=='' would help cause it worked for me after that

Enh: Auto create a migration for every action CRUD yii\rbac\Item

The file is like as

<?php

use yii\db\Schema;
use yii\db\Migration;

class m150910_204507_init_blog_rbac extends Migration
{
    public function up()
    {
        $auth = Yii::$app->authManager;

        $manageBlog = $auth->createPermission('manageBlog');
        $manageBlog->description = 'Manage blog';
        $auth->add($manageBlog);

        $admin = $auth->createRole('admin');
        $admin->description = 'Administrator';
        $auth->add($admin);
        $auth->addChild($admin, $manageBlog);
    }

    public function down()
    {
        Yii::$app->authManager->removeAll();
    }
}

Error in console

If you add module to common/config/main.php (advanced app)
and run ./yii
then
Exception 'ReflectionException' with message 'Class user does not exist'
will be raised.

Probably module should be added to @app/config/main, not common.

Help me please!!

Hello! I'm new on this, and i want to start the module, i have added
'authManager' => [
'class' => 'yii\rbac\DbManager',
],
in my /common/config/main-local.php, now i need to find the file called config.php to continue, can you help me? Thanks, regards.

jQuery 3 compability

How about create tag for current version and publish another for jQuery 3 compability?

Demo

Demo page is not working

create role has a problem

when I'm trying to save a role I get internal server error
xception 'yii\base\ErrorException' with message 'Call to undefined method githubjeka\rbac\models\ItemForm::getDb()'

Yii Version ===>2.0.15.1
PHP Version ==>5.6.24

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.