Giter Club home page Giter Club logo

yii-rbac-migrate's Introduction

yii-rbac-migrate

Helper command to ease track of RBAC changes. This works only for AuthManager that uses database - CDbAuthManager or any other. Of course it depends on your way of changing RBAC roles - manually or via GUI. So in case of using GUI (like we are doing it), this helper will be very useful.

Usage:

  1. at developer machine add next command at 'commandMap' of your config:
'commandMap' => array(
		'rbacMigrate' => array(
			'class' => 'root.console.extensions.yii-rbac-migrate.rbacMigrateCommand',
		),
),

Command has alot of settings, so you can get info about it at source code. But by default, it must works fine with default CDbAuthManager.

  1. run this command first time and it will create installation SQL that you will need to manually load into your developer's database.

  2. from now any changes at RBAC core tables (itemTable, itemChildTable) will be logged.

  3. when you will be ready to create migration, run this command again and it will create a new migration with all tracked changes.

  4. revise that migration file and if everything is OK, then remove protection (abstract method 'foo').

  5. run this new migration at production server, like you always do.

P.S.: Only core tables are tracking. Any assignments you will need to do manually - anyway that's bad idea auto-assign at production server. At least at such auto migration, better to create a new one migration where you will assign/revoke roles to/from users.

N.B.: This is BETA version.

yii-rbac-migrate's People

Contributors

plandem avatar

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.