crisu83 / yii-rights

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

API to install Rights programatically #43

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi Chris,
I'd like to be able to install Rights from my own app installer.
Having a way to do that would be great.

Original issue reported on code.google.com by rodrigo.coelho@gmail.com on 3 Mar 2011 at 9:33

GoogleCodeExporter commented 9 years ago
Hey Rodrigo,

Could you be a bit more specific on what you would require to achieve this?

Original comment by Christof...@gmail.com on 12 Mar 2011 at 11:54

GoogleCodeExporter commented 9 years ago
Hi :)

When I install an application, I have also to install Rights via its own 
installer page.
I'd like to have a method to call in Rights, from my installer, to make it 
perform its installation.

This way I would be able to make a Rights install while installing my 
application.

Original comment by rodrigo.coelho@gmail.com on 12 Mar 2011 at 12:16

GoogleCodeExporter commented 9 years ago
Hi,

what do you think about using db migrations for this task.

I've created a rough migration class for yii-rights, which you'll find attached 
to this post.
You could either call it by your web application or command line.

See 
http://www.yiiframework.com/forum/index.php?/topic/17591-planning-yii-cms-a-diff
erent-approach/page__view__findpost__p__88582 for more information (e.g. using 
an own migration table for every module)

Best regards,
schmunk

Original comment by schm...@usrbin.de on 14 Apr 2011 at 1:55

Attachments:

GoogleCodeExporter commented 9 years ago
That's a good solution, schmunk.
Thank you!

Original comment by rodrigo.coelho@gmail.com on 14 Apr 2011 at 10:08

GoogleCodeExporter commented 9 years ago
Just one more thing to note. My proposal would be placing the migrations class 
into module/rights/migrations and call it via yiic, like:

protected/yiic migrate \
    --migrationPath=application.modules.rights.migrations \
    --migrationTable=tbl_migration_module_rights

We'll need this to avoid conflicts between the modules and the application 
migrations.

There's also a web-based prototype installer available 
https://github.com/schmunk42/phundament/tarball/01fd678fd7d8ae17d51a63776b4b217d
81f96e52

Original comment by schm...@usrbin.de on 15 Apr 2011 at 11:20

GoogleCodeExporter commented 9 years ago
Sorry, wrong download link above, correct link here:
https://github.com/schmunk42/phundament/archives/3463fc4144920b71d053d9b56882a39
29c34903c

More info (docs): 
http://www.yiiframework.com/forum/index.php?/topic/17591-planning-yii-cms-a-diff
erent-approach/page__view__findpost__p__88835

Original comment by schm...@usrbin.de on 15 Apr 2011 at 11:22

GoogleCodeExporter commented 9 years ago
Here are the files you may include into the module.
A folder for migrations/db-schema installation (may need some work though) and 
a folder with the default config, it's very handy to have it in the source code.

Original comment by schm...@usrbin.de on 10 Jun 2011 at 12:12

Attachments:

GoogleCodeExporter commented 9 years ago
Hey schmunk,

I will take a look at this when I have time. Thanks for this.

Original comment by Christof...@gmail.com on 10 Jun 2011 at 12:39