RADIUSdesk

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
getting_started:install_ubuntu_update [2017/04/06 11:27] – [Patching the database] admingetting_started:install_ubuntu_update [2017/06/14 12:59] (current) – [Applying the Database Patches] admin
Line 9: Line 9:
  
 <WRAP center round tip 100%> <WRAP center round tip 100%>
-This is a once-off action+This is a once-off action and only needs to be done once if you are still running a CakePHP v2 based system
 </WRAP> </WRAP>
  
Line 30: Line 30:
 ===== Check the Nginx config  ===== ===== Check the Nginx config  =====
 <WRAP center round tip 100%> <WRAP center round tip 100%>
-This is a once-off action+This is a once-off action and only needs to be done once if you are still running a CakePHP v2 based system.
 </WRAP> </WRAP>
  
Line 61: Line 61:
  
 ---------------------- ----------------------
 +
 +===== Install The Improved Dynamic Login Pages  =====
 +<WRAP center round tip 100%>
 +This is a once-off action and only needs to be done once if you are still running the older login pages that has a seperate page for mobile devices and desktop devices.
 +</WRAP>
 +
 +  * Check out the latest login pages from the SVN repository.
 +<code bash>
 +cd /usr/share/nginx/html
 +sudo svn checkout svn://dvdwalt@svn.code.sf.net/p/radiusdesk/code/trunk/login ./login
 +</code>
 +
 +----------------------
 +
  
 ===== Update the code ===== ===== Update the code =====
Line 75: Line 89:
 sudo svn update sudo svn update
 #Login Pages #Login Pages
-cd /usr/share/nginx/html/rd_login+cd /usr/share/nginx/html/login
 sudo svn update sudo svn update
  
Line 103: Line 117:
  
  
-===== Changing the naming convention on the rights ===== +===== Applying the Database Patches ===== 
-  * RADIUSdesk makes use of the advanced rights management available with CakPHP. +  * As the code evolve we sometimes create patches to the databaseRun the following instructions to apply the latest patches
-  * Between CakePHP v2 and CakePHP v3 some conventions changed and we have to update some entries in the rights that was defined. +  * These patches are non-destructive which means you can run them multiple times without harm done
-  * In the past an Access Controller method called by a web page could look like this **index_ap**.  +<code bash> 
-  * The new convention is **indexAp**+cd /usr/share/nginx/html/cake3/rd_cake/setup/db 
-  * The following table will indicate which methods were updated with the migration+sudo mysql -u root rd < correct_realm_acos.sql 
-  * Go to **Other -> Rights Managment -> Access Controll Objects -> Access Providers -> Controllers** and check that your system has the following changes:+sudo mysql -u root rd < rd_rename_key_column.sql 
 +sudo mysql -u root rd < rd_photo_add_active_column.sql 
 +sudo mysql -u root rd < rd_photo_more_enhancements.sql 
 +sudo mysql -u root rd < top_up_improvements.sql 
 +sudo mysql -u root rd < add_language_selection_to_dynamic_details.sql 
 +sudo mysql -u root rd < captive_portal_dns.sql 
 +sudo mysql -u root rd < byod_improvements.sql 
 +sudo mysql -u root rd < rd_rename_key_column_2.sql 
 +sudo mysql -u root rd < correct_users_and_groups_aros.sql 
 +</code>
  
-^ Controller      ^ CakePHP v2 Value       ^ CakePHP v3 Value          ^ +------
-| Ssids    | index_ap     | indexAp        | +
-| AccessProviders    | change_password     | changePassword    | +
-| AccessProviders    | export_csv     | exportCsv    | +
-| AccessProviders    | note_index     | noteIndex    | +
-| AccessProviders    | note_add    | noteAdd    | +
-| AccessProviders    | note_del    | noteDel    | +
-| AccessProviders    | enable_disable    | enableDisable    | +
-| Tags    | export_csv    | exportCsv   | +
-| Tags    | index_for_filter    | indexForFilter   | +
-| Tags    | note_index     | noteIndex    | +
-| Tags    | note_add    | noteAdd    | +
-| Tags    | note_del    | noteDel    | +
-| Ssids    | index_ap    | indexAp   | +
-| Realms   | export_csv    | exportCsv   | +
-| Realms   | index_for_filter    | indexForFilter   | +
-| Realms    | note_index     | noteIndex    | +
-| Realms    | note_add    | noteAdd    | +
-| Realms    | note_del    | noteDel    | +
-| Realms   | index_ap   | indexAp   | +
-| Realms   | update_na_realm   | updateNaRealm   | +
-| DynamicDetails   | upload_logo   | uploadLogo   | +
-| DynamicDetails   | index_photo   | indexPhoto   | +
-| DynamicDetails   | upload_photo   | uploadPhoto   | +
-| DynamicDetails   | delete_photo   | deletePhoto   | +
-| DynamicDetails   | edit_photo   | editPhoto   | +
-| DynamicDetails   | index_page   | indexPage   | +
-| DynamicDetails   | add_page   | addPage   | +
-| DynamicDetails   | edit_page   | editPage   | +
-| DynamicDetails   | delete_page   | deletePage   | +
-| DynamicDetails   | index_pair   | indexPair   | +
-| DynamicDetails   | add_pair   | addPair   | +
-| DynamicDetails   | edit_pair   | editPair   | +
-| DynamicDetails   | delete_pair   | deletePair   | +
-| DynamicDetails   | note_index   | noteIndex   | +
-| DynamicDetails   | note_add   | noteAdd   | +
-| DynamicDetails   | note_del   | noteDelr +
-| DynamicDetails   | edit_settings   | editSettings   | +
-| DynamicDetails   | view_social_login   | viewSocialLogin +
-| DynamicDetails   | edit_social_login   | editSocialLogin +
-| DynamicDetails   | **NEW**   | shufflePhoto +
-| Profiles   | index_ap   | indexAp +
-| Profiles   | manage_components   | manageComponents +
-| Profiles   | note_index   | noteIndex +
-| Profiles   | note_add   | noteAdd +
-| Profiles   | note_del   | noteDel +
-| Profiles   | index_for_filter  | **DELETE**   | +
-| Profiles   | export_csv  | **DELETE**   | +
- +
-  * Be sure to also allow new additions under **Access Provider Rights** +
- +
- +
-<WRAP center round info 100%> +
-Be sure to check this table out upon each SVN update since it will grow as we migrate more and more controllers from CakePHP v2 to CakePHP v3. +
-</WRAP>+
  
 ===== Copy the existing images  ===== ===== Copy the existing images  =====
Line 184: Line 153:
  
  
-===== Patching the database ===== +===== Updating the rights system on the database ===== 
-  * Here we'll list the sql patches to run against the database.+  * Since we are migrating from CakePHP v2 to CakePHP v3 some conventions on the rights system changed. 
 +  * We developed a script which you can run to fix these conventions for you. 
 +  * Again this script is non-destructive which means you can run it multiple times, especially after new code has been added from the SVN repository.
  
 <code bash> <code bash>
-#You can run this multiple times they are non-destructive +cd /usr/share/nginx/html/cake3/rd_cake 
-#Rename the key column to avoid clashing with SQL reserved words +sudo ./bin/cake migrate_radiusdesk 
-sudo mysql -u root rd < /usr/share/nginx/html/cake3/rd_cake/setup/db/rd_rename_key_column.sql  +sudo chown -R www-data. /usr/share/nginx/html/cake3/rd_cake/tmp 
-#Add feature to enable disable photos +sudo chown -R www-data. /usr/share/nginx/html/cake3/rd_cake/logs 
-sudo mysql -u root rd < /usr/share/nginx/html/cake3/rd_cake/setup/db/rd_photo_add_active_column.sql +sudo chown -R www-data. /usr/share/nginx/html/cake3/rd_cake/webroot/img/realms 
-#Some more enhancements +sudo chown -R www-data. /usr/share/nginx/html/cake3/rd_cake/webroot/img/dynamic_details 
-sudo mysql -u root rd < /usr/share/nginx/html/cake3/rd_cake/setup/db/rd_photo_more_enhancements.sql +sudo chown -R www-data. /usr/share/nginx/html/cake3/rd_cake/webroot/img/dynamic_photos 
-#Some DNS Enhancements +sudo chown -R www-data. /usr/share/nginx/html/cake3/rd_cake/webroot/img/access_providers 
-sudo mysql -u root rd < /usr/share/nginx/html/cake3/rd_cake/setup/db/captive_portal_dns.sql +sudo chown -R www-data/usr/share/nginx/html/cake3/rd_cake/webroot/files/imagecache
-#Adjust ACOs rights +
-sudo mysql -u root rd < /usr/share/nginx/html/cake3/rd_cake/setup/db/correct_realm_acos.sql+
 </code> </code>