Yii Framework Forum: [EXTENSION] srbac : Web interface for the administration of rbac - Yii Framework Forum

Jump to content

  • (38 Pages)
  • +
  • « First
  • 3
  • 4
  • 5
  • 6
  • 7
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

[EXTENSION] srbac : Web interface for the administration of rbac Rate Topic: ****- 7 Votes

#81 User is offline   murugan 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 72
  • Joined: 12-June 09
  • Location:Chennai,India

Posted 17 September 2009 - 06:48 AM

Hi spyros
i have one doubt
in gmail login when we click Stay signed in checkbox once and when we open gmail page it automatically checked it.
i want to do same in yii
i gave
$duration=$form->rememberme ? 3600*24*30 : 0; // 30 days
Yii::app()->user->login($identity,$duration);

then
how to auto check when once that check box checked
1

#82 User is offline   idle sign 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 56
  • Joined: 18-September 09
  • Location:Novosibirsk, Russia

Posted 18 September 2009 - 01:30 AM

Beta 4/5 persistent bug:
AuthItemController.php has undefined variables: 'active' & 'message' (near 147).
Though 'message' is defined since beta 5, variable with the same name is still not passed to renderPartial() in TaskToRole.php, roleToUser.php, operationToTask.php.

For the first time the bug was reported at http://www.yiiframew...c/reviews/#c516
0

#83 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 18 September 2009 - 02:51 AM

View Postidle sign, on 18 September 2009 - 01:30 AM, said:

Beta 4/5 persistent bug:
AuthItemController.php has undefined variables: 'active' & 'message' (near 147).
Though 'message' is defined since beta 5, variable with the same name is still not passed to renderPartial() in TaskToRole.php, roleToUser.php, operationToTask.php.

I would also like to point out, that code without E_NOTICEs would be very nice!
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#84 User is offline   Spyros 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 461
  • Joined: 14-April 09
  • Location:Athens - Greece

Posted 20 September 2009 - 08:08 AM

Hi,
Most of the things discussed here are probably fixed in version 1.00
http://www.yiiframew...xtension/srbac/

Enhancements:
Srbac can be installed as a child module too
Custom cssFile support
Bug fixes:
Fixed undefined variables (thanks to sebi, idle sign)
Fixed possible SQL-injections flaw (thanks to Anticon)
Fixed jquery requested twice (thanks to horizons)
Use Yii:app()->getRequest() instead of $_REQUEST (thanks to horizons)

About the license file do you need something specific? Isn't the one in the extensions page ok?

If you find any errors please let me know
0

#85 User is offline   idle sign 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 56
  • Joined: 18-September 09
  • Location:Novosibirsk, Russia

Posted 21 September 2009 - 03:34 AM

1. Seems to me, that's a high time to think about UI translations.
Currently 'sourceLanguage'=>'ru' or 'el_gr' or something else gives us nothing but built-in English UI.

Nevertheless see russian messages in attachment (based on 'el_gr' messages file from 1.00).

2. Frontpage wanted with manage and list links.

3. I think, the idea to address authitems by names in db tables is not as good as it seems, personally I'd rather like to have 'id' primary key and 'name' unique key in items table. In that way we can make item renaming easier and even save some hdd space :).
Besides 'alias' field could be useful. That's when we scan through the authitems list we see 'alias' (meaningful user friendly name, probably in native language) and 'name' (the name we use in script, probably in English).

Attached File(s)


This post has been edited by idle sign: 21 September 2009 - 04:07 AM

0

#86 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 23 September 2009 - 03:24 AM

View PostSpyros, on 20 September 2009 - 08:08 AM, said:

About the license file do you need something specific? Isn't the one in the extensions page ok?

This one is fine, nevermind.
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#87 User is offline   Spyros 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 461
  • Joined: 14-April 09
  • Location:Athens - Greece

Posted 23 September 2009 - 11:43 AM

View Postidle sign, on 21 September 2009 - 03:34 AM, said:

1. Seems to me, that's a high time to think about UI translations.
Currently 'sourceLanguage'=>'ru' or 'el_gr' or something else gives us nothing but built-in English UI.

Nevertheless see russian messages in attachment (based on 'el_gr' messages file from 1.00).

2. Frontpage wanted with manage and list links.

3. I think, the idea to address authitems by names in db tables is not as good as it seems, personally I'd rather like to have 'id' primary key and 'name' unique key in items table. In that way we can make item renaming easier and even save some hdd space :).
Besides 'alias' field could be useful. That's when we scan through the authitems list we see 'alias' (meaningful user friendly name, probably in native language) and 'name' (the name we use in script, probably in English).



1. I'll try the russian translation. The greek translation doesn't work for you?

2.Yes, that's true

3.That's the way Yii authManager handles the auth items. I think renaming works ok as it is now, about the alias i'll try to add a column and hope I wont break anything in AuthManager's code
0

#88 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 23 September 2009 - 03:45 PM

View PostSpyros, on 23 September 2009 - 11:43 AM, said:

3.That's the way Yii authManager handles the auth items. I think renaming works ok as it is now, about the alias i'll try to add a column and hope I wont break anything in AuthManager's code

Why don't you use the translation module for user friendly names?
You wouldn't even have to touch the database to rename items 8)
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#89 User is offline   Ben 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 274
  • Joined: 15-March 09

Posted 23 September 2009 - 07:32 PM

True, but I guess you wouldn't be able to provide names for the application source language if you did that (because no translation will be done if source language == requested language). But you could use translations for the item description.
Don't like ads in my sig...
0

#90 User is offline   idle sign 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 56
  • Joined: 18-September 09
  • Location:Novosibirsk, Russia

Posted 23 September 2009 - 10:01 PM

View PostSpyros, on 23 September 2009 - 11:43 AM, said:

1. I'll try the russian translation. The greek translation doesn't work for you?

Nope :huh:

View PostSpyros, on 23 September 2009 - 11:43 AM, said:

3.That's the way Yii authManager handles the auth items. I think renaming works ok as it is now, about the alias i'll try to add a column and hope I wont break anything in AuthManager's code

Alias column, as I see it, just can't brake anything in AuthManager, if only we use it in srbac's administration UI solely for user convinience.

View Postschmunk, on 23 September 2009 - 03:45 PM, said:

Why don't you use the translation module for user friendly names?
You wouldn't even have to touch the database to rename items 8)

Translations for authItems names which are given by user, do you mean?
Hm, really it's not the case to use translation module for dynamic data.


This morning I was blessed with yet another crazy idea:
If srbac has an option to create authItems automatically from existing application controllers, it would be helpful. E.g. we say to srbac: create authItems for actions in controller 'Article', it creates operations from given actions ('Create Article', 'Edit Article' etc.) and a task ('Manage Article'), then automatically assigns these operations to this task. That's the basic idea. If we step even further srbac could form accessRules() function for a given controller.
0

#91 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 24 September 2009 - 02:37 AM

View Postidle sign, on 23 September 2009 - 10:01 PM, said:

Translations for authItems names which are given by user, do you mean?
Hm, really it's not the case to use translation module for dynamic data.

Ok, if your authData is highly dynamic it's not a good idea. In my case it's more or less static.
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#92 User is offline   Ben 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 274
  • Joined: 15-March 09

Posted 24 September 2009 - 09:31 AM

View Postidle sign, on 23 September 2009 - 10:01 PM, said:

This morning I was blessed with yet another crazy idea:
If srbac has an option to create authItems automatically from existing application controllers, it would be helpful. E.g. we say to srbac: create authItems for actions in controller 'Article', it creates operations from given actions ('Create Article', 'Edit Article' etc.) and a task ('Manage Article'), then automatically assigns these operations to this task. That's the basic idea. If we step even further srbac could form accessRules() function for a given controller.


Funny. I also planed to implement this in my project. ^^
Mapping actions to operations, controllers to tasks and maybe modules to roles.

If this extension could do that, I wouldn't have to do it on my own. :)
Don't like ads in my sig...
0

#93 User is offline   robregonm 

  • Experienced Yii Developer
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 601
  • Joined: 30-July 09
  • Location:Colombia

Posted 24 September 2009 - 10:45 AM

I've attached the translated messages to spanish for Srbac v.1.0.0. Attached File  es_es.tar.gz (1.12K)
Number of downloads: 4
I hope everyone enjoy.
Spyros, Thanks for thaat excellent extension. It's simply gr8.
Note:
- Uncompress the file into modules/srbac/messages folder
- Rename the folder: "es_es" to "es"
- Add "'language'=>'es'," in your config file (main.php)
And that's all, everything will work like a charm
Ricardo Obregón
LinkedIn Profile
YiiFramework en Español - http://yiiframework.co/ - Yii Code Generator for Bootstrap
http://obregon.co/ - https://1server.co/
PHP 5.5+, nginx, MySQL, PostgreSQL, Yii 1.x & 2.x, CanJS and more.
Follow me: @robregonm & @obregonco & @1ServerCo.
0

#94 User is offline   Spyros 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 461
  • Joined: 14-April 09
  • Location:Athens - Greece

Posted 24 September 2009 - 10:52 AM

I have already implemented the use of custom layout for srbac and the ajax loading indicators.
I will try the automatic creation of operations/tasks from controllers/actions and let you know
0

#95 User is offline   Spyros 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 461
  • Joined: 14-April 09
  • Location:Athens - Greece

Posted 28 September 2009 - 12:44 AM

The Russian translation is working (I think)
Posted Image
The spanish file is corrupted.Please send it again as a zip or rar file.
0

#96 User is offline   idle sign 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 56
  • Joined: 18-September 09
  • Location:Novosibirsk, Russia

Posted 28 September 2009 - 07:07 AM

View PostSpyros, on 28 September 2009 - 12:44 AM, said:

The Russian translation is working (I think)

Right you are judging by this screenshot, but on my test app neither 'sourceLanguage'=>'ru' nor 'language'=>'ru' helps.
0

#97 User is offline   robregonm 

  • Experienced Yii Developer
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 601
  • Joined: 30-July 09
  • Location:Colombia

Posted 28 September 2009 - 07:40 AM

View PostSpyros, on 28 September 2009 - 12:44 AM, said:

The Russian translation is working (I think)
Posted Image
The spanish file is corrupted.Please send it again as a zip or rar file.

Sure, Here it is again. Now in Zip format.
Attached File  es.zip (1.25K)
Number of downloads: 2
Ricardo Obregón
LinkedIn Profile
YiiFramework en Español - http://yiiframework.co/ - Yii Code Generator for Bootstrap
http://obregon.co/ - https://1server.co/
PHP 5.5+, nginx, MySQL, PostgreSQL, Yii 1.x & 2.x, CanJS and more.
Follow me: @robregonm & @obregonco & @1ServerCo.
0

#98 User is offline   erikomorais 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 17-June 09

Posted 29 September 2009 - 08:13 AM

Hi, Spyros

While creating a user, i need to assign the role for this user, right from the user creation _form. I tried to populate a dropdownlist with AuthItem values, using AuthItem::model()->findAll($criteria), but did not manage to get it working. How can i access this model from the srbac module?

By the way, thanks for this great module.
Erik o - 0
v
--v\\
0

#99 User is offline   Spyros 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 461
  • Joined: 14-April 09
  • Location:Athens - Greece

Posted 30 September 2009 - 02:10 AM

View Postidle sign, on 28 September 2009 - 07:07 AM, said:

Right you are judging by this screenshot, but on my test app neither 'sourceLanguage'=>'ru' nor 'language'=>'ru' helps.



I just put this in my main config file
return array(
  'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
  'language'=>'ru',
....


and it works
Also the spanish translation is working

There is also one more file for translation, the
views/install/installText.php
for the installation translation
0

#100 User is offline   Spyros 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 461
  • Joined: 14-April 09
  • Location:Athens - Greece

Posted 30 September 2009 - 02:17 AM

View Posterikomorais, on 29 September 2009 - 08:13 AM, said:

Hi, Spyros

While creating a user, i need to assign the role for this user, right from the user creation _form. I tried to populate a dropdownlist with AuthItem values, using AuthItem::model()->findAll($criteria), but did not manage to get it working. How can i access this model from the srbac module?

By the way, thanks for this great module.


Have you put a
Yii::import('application.modules.srbac.models.AuthItem');
before you call the AuthItem::model()->findAll($criteria)
0

Share this topic:


  • (38 Pages)
  • +
  • « First
  • 3
  • 4
  • 5
  • 6
  • 7
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

3 User(s) are reading this topic
0 members, 3 guests, 0 anonymous users