CodeBlastr / SYSTEM

Free Open Source Multi-Site CMS ( content management system ) built on the CakePHP rapid development MVC framework. Rapidly build large scale applications or use the numerous plugins like Project Management, Contact Relationship Management (CRM), Invoicing and more.
GNU General Public License v3.0
73 stars 33 forks source link

Upgrade Install Suggestion #13

Open CodeBlastr opened 12 years ago

CodeBlastr commented 12 years ago

Summary : After a user logs in the first time, they should automatically have the privileges sections update run.

Currently : After you login, after the first install, you are shown your user account, and this leaves the acos table empty.

Desired : After you login, after install. Either privileges should automatically be updated, or you should at least be redirected to /privileges/sections with a message to run the update.

akhileshs-clarion commented 12 years ago

We understood that after first installation, admin user should be redirected to /privileges/sections and here we need to show a message which would ask to run the update for privileges for users.

We would like to understand after clicking on "Run Update" button, what would be the process being executed. It would be good if you can explain the process in details with example.

CodeBlastr commented 12 years ago

In order to update privileges you go here : http://example.com/privileges/sections/clear_session and click "run update". You will see the function being triggered by clicking "run update" that it runs this controller function : http://example.com/privileges/sections/aco_sync . I think that will show you the process being executed. This code is where it starts...

https://github.com/zuha/Zuha/blob/master/app/Plugin/Privileges/Controller/PrivilegesAppController.php#L99

The important thing to note is that the aco_sync() method runs as a series of page refreshes. This was because running it as a single process caused the server to time out, as it takes too long.