2012-10-02 - [GRASE-Hotspot] #86: Allow Admin to archive a user’s session data, which will reset their “data usage”

Header Data

From: GRASE Trac <tr***c@grasehotspot.org>
Message Hash: 41a245c4b8cc6d8a8f96795a0a5336a9b382aef751c485f543dc4d32c4dac8c5
Message ID: <044.e28d827755991f011e0beb2f4ea9b110@grasehotspot.org>
Reply To: N/A
UTC Datetime: 2012-10-02 16:35:24 UTC
Raw Date: Tue, 02 Oct 2012 23:35:24 -0000

Raw message

#86: Allow Admin  to  archive a user's session data,  which will reset their
"data usage"
-----------------------------+-----------------
 Reporter:  bob hunt         |      Owner:  tim
     Type:  enhancement      |     Status:  new
 Priority:  minor            |  Milestone:  3.9
Component:  Admin Interface  |    Version:  3.7
 Keywords:                   |
-----------------------------+-----------------
 Add a button to Admin's "edituser" page to archive a user's session data
 in order to reset their "data usage" back to zero.

 This is needed as there is currently a bug in freeradius which prevents a
 user being allocated a data limit greater than 4 Gb, so it is difficult to
 allow regular monthly users to keep their usernames.

 4 modified files attached

 In /usr/share/grase/www/radmin/templates/edituser.tpl add a
 'resetDataUseSubmit' button at lines 87 to 93.

 In /usr/share/grase/www/radmin/edituser.php insert a new function;
 "if(isset($_POST['resetDataUseSubmit']))" function at lines 163 to 172
 (calls "database_archive_user_data($username)"

 In /usr/share/grase/www/radmin/includes/database_functions.inc.php insert
 a new function;
 "function database_archive_user_data($username)" at lines 264 to 267
 (calls "condenseThisUser($username)")

 In /usr/share/grase/www/radmin/classes/DatabaseFunctions.class.php insert
 a new function;
  "public function condenseThisUser($username)" at lines 1392 to 1507

 The DatabaseFunction added is based on condensePreviousMonthsAccounting()
 in cronFunctions.class.php. It condenses and moves all the current user's
 session data (except any open sessions), from radacct into mtotacct but
 doesn't touch radcheck.

-- 
Ticket URL: <http://trac.grasehotspot.org/ticket/86>
GRASE Hotspot <http://grasehotspot.org/>
GRASE Hotspot bug tracker




Thread

  • Return to October 2012

  • Return to “GRASE Trac <tr***c@grasehotspot.org>

  • 2012-10-02 (Tue, 02 Oct 2012 23:35:24 -0000) - [GRASE-Hotspot] #86: Allow Admin to archive a user’s session data, which will reset their “data usage” - GRASE Trac <tr***c@grasehotspot.org>