fix run_model call so that it works with non-default options as well.
[sgn.git] / mason / test / test_authenticate.mas
blob64eca87de1c8388955947901931f8b890ee1bf72
1 <& /util/import_javascript.mas, classes=>[ "jquery.cookie" ] &>
4 <br/><br/>
5 <h1>User Information</h1>
6 <hr>
8 <table class="table table-hover">
9   <thead>
10     <th>Person ID</th>
11     <th>Username</th>
12     <th>First Name</th>
13     <th>Last Name</th>
14     <th>Roles</th>
15   </thead>
16   <tbody id="person_data">
17   </tbody>
18 </table>
20 <script>
21 $(document).ready(function() {
23     var cookie = $.cookie('sgn_session_id');
25     $.ajax({
26         dataType: "json",
27         url: "/authenticate/check/token",
28         data: ({cookie:cookie}),
29         success: function(data) {
30             var data_html = '';
31             for (r in data.result) {
32                 data_html += "<tr><td>"+data.result[r].person_id+"</td><td>"+data.result[r].username+"</td><td>"+data.result[r].first_name+"</td><td>"+data.result[r].last_name+"</td><td>";
33                 for (x in data.result[r].roles) {
34                     data_html += data.result[r].roles[x] + "<br/>";
35                 }
36                 data_html += "</td></tr>";
37             }
38             $('#person_data').html(data_html);
39         }
40     });
41     
42 });
43 </script>