An idea for Role Based Access Control

Quote

Quote

Edit:

Attached blog demo from Yii 1.0.3 with Rbac.

There may be name mismatch between the table and the code. Error message says

Quote

The table "Post" for active record class "Post" cannot be found in the database.
while the schema shows

Quote

DROP TABLE IF EXISTS `post`;

CREATE TABLE IF NOT EXISTS post (

  id int(11) NOT NULL auto_increment,

  title varchar(128) NOT NULL,

  content text NOT NULL,

  contentDisplay text,

:

I've created it with a XAMPP. It seems that the phpmyadmin of it automatically changes the tablenames to lowercase. This is no problem on Windows but on Linux it produces the the encountered errors. This is evil.

You have to to change tablenames in the models to get it work: Post -> post, PostTag -> posttag, etc. I will try to fix in the zip-file the next days.

For further information take a look at:

http://dev.mysql.com…ensitivity.html

Hi,

in my database I have table "user". RBAC extension use "users".

So, what I have to do use this extension? Is it possible to do with no update my table name?

Thanx!

You will have to edit

Rbac.php

RbacCommand.php

and the database constraint that points to the users table.

It shouldn't take that long but probably a bit longer than renaming the table.

Quote

You will have to edit

Rbac.php

RbacCommand.php

and the database constraint that points to the users table.

It shouldn't take that long but probably a bit longer than renaming the table.

Actually he won't. Here's a pack that should work nicely for you. Now this has NOT been prepared for release so there's probably some random stuff I was working on mixed in but you can just pick and choose files. The SQL file I packed will get you started but you'll have to add the admin/password user and all the permissions.

Also I was mid-way through with a profile system which you'll also probably want to rip out. But if you just want the SQL and RBAC files they're in there for ya.

http://www.easy-shar…32/Yii_RBAC.zip

thanx, but I think that should be configuration file for this.

I have been chasing the description of the the extension one by one.

Quote

start adding roles and permissions with the rbac shell command, e.g. run ./protected/yiic shell to enter running shell and then issue rbac command to get its help.

It is strange but nothing had happened when I entered the command as follows.

Quote

$ protected/yiic shell

I copied yiic from the existing application such as blog demo, but no success. :cry: Does anyone know the reason?

[EDIT]

Before inserting filter method in the SiteController, yiic shell works (waits for me at least).

Quote

public function filters()

{

  return array(

    array(

            'application.filters.RbacFilter',

          ),

  );

}

Hi,

I have the same problem in my site when I have to login to show index page.

Quote

In a week or so I'm going to upload heavily modified code. It will be a configurable Yii module, with own login/logout/signup/passwordForgot features and admin interface for managing roles, permissions and users.

How is it going with the yii module?

Few changes left :)

Quote

How is it going with the yii module?

first thanks for helping exnding this framework…

I am thinking use you auth extension with module roles link an CMS…

can your system build permissions based on module acesse roles?

like

/modules/forum

/modules/chat

…etc

Any comments are wellcome

regards

Max

Hi!

Yes, I will soon upload the version that fully supports modules.

can I help building anything?

(debuging, beta testing before upload)

:)

regards

Quote

can I help building anything?

(debuging, beta testing before upload)

I would also like to volunteer to help test and debug anything, though I admit that I'm not a php guru.

By any chance is this module available in a git repo?

Do you or anybody who uses/develops/tests this module hang out on IRC?

you can test a full user autentication from db, with users and groups, here with a generic auth class buildin in YII

http://www.yiiframew…opic,799.0.html

(of couser this is a gereric not modular)

oleksiy,

exist any chance this extension migrate under YII modules dir like

/modules/userscontrol/

regards

Max

Hi Max,

I've made a small cutoff of the project we are working on now. It contains RBAC as module, with a complete login/logout/register/password_forgot feature and some additional models/controllers.

You may need to change mail server settings in main.conf in order to send emails.

You may also try and test my ajax dialogs and forms, BaseAdminController which implements them together with any deep level of relations sorting and filtering - have a look at adminAttributes() method in /protected/models/*

link to file: http://luckyteam.co…mp/rbactest.zip

Quote

Hi Max,

I've made a small cutoff of the project we are working on now. It contains RBAC as module, with a complete login/logout/register/password_forgot feature and some additional models/controllers.

You may need to change mail server settings in main.conf in order to send emails.

You may also try and test my ajax dialogs and forms, BaseAdminController which implements them together with any deep level of relations sorting and filtering - have a look at adminAttributes() method in /protected/models/*

Not sure you wanted to post your entire project file. Might want to remove some of that. But regardless, It's very interesting to read through.

Thats not the whole project file, its a really short cutoff :) Just to demonstrate how one can connect users with logins (RbacLogin) and some examples with my BaseAdminController.

RBAC is completely separated there in the /modules/rbac folder. Beside for BaseAdminControler, BaseAdminFilter, RbacFilter class and Rbac component.

oleksiy,

Thanks for share this project

realy Nice;

I am try working in similar project…

are you know xoops cms? http://www.xoops.org

this cms have a beatufully OO user/groups management, maby we can import the usability to RBAC

changing 'block' for 'actions'

:)