tingobol / yii-rights

Automatically exported from code.google.com/p/yii-rights
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Export/Import authorization items #51

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Purpose of this feature request:
To make it easier to move authorization items from one installation to another.

How should it work?
-

Please provide any additional information below.
Possibly save the data as a CSV-file.

Original issue reported on code.google.com by Christof...@gmail.com on 12 May 2011 at 1:56

GoogleCodeExporter commented 9 years ago
Just an idea: Maybe importing/exporting through a second authManager instance 
would do the job?

Something like:

{{{
$exporter = new CPhpAuthManager();
$exporter->authFile = ...

$aAuthItems = Yii::app()->authManager->getAuthItems();
foreach ($aAuthItems as $authItem)
  $exporter->createAuthItem( $authItem->name, $authItem->description, ... );

$exporter->save();
}}}

Original comment by benjamin...@gmail.com on 24 May 2011 at 8:03