| Commit message (Collapse) | Author | Age | Lines |
| |
|
| |
|
|
|
|
| |
Make it updatable via the user admin page.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the "log in as" function after 3b6e5a692b852a88f55b21a7210f60a6f7cfc24b
would attempt to log the admin user out before issuing the redirect. Unfortunately
this approach does not work on WhatDoTheyKnow, where the admin pages are served via
a different domain (secure.mysociety.org) and so do not share session information with
the rest of the site.
This commit changes it to mark the PostRedirect with circumstance == "login_as",
which signals the user controller to log out the previous user even if they are
an admin. In other words, the user is logged out on the main site rather than the
admin site, skirting this problem.
Closes #450.
|
|
|
|
|
|
| |
Don't change logged-in user from an admin when visiting a auto-login URL.
Closes #306.
|
|
|
|
|
|
|
|
|
| |
The ad hoc specification of fixtures has been an ongoing source
of bugs in the tests. The straw that broke the camel’s back is
that 7c6eb09 requires the fixtures to be loaded in order (i.e.
children before their parents), and it would have been a painful
process to reorder all the dozens of different fixture lists,
but the test system ought to be more reliable this way.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without this addition, the "shows a user" test would fail unless run in a
context where the public body fixtures had already been loaded, with an
error like this:
ActionView::TemplateError in 'AdminUserController when administering users shows a user'
undefined method `name' for nil:NilClass
On line #14 of app/views/admin_request/_some_requests.rhtml
11: <% for info_request in info_requests %>
12: <tr class="<%= cycle('odd', 'even') %>">
13: <td><%= request_both_links(info_request) %></td>
14: <td><%= public_body_both_links(info_request.public_body) %></td>
15: <td><%= user_both_links(info_request.user) %></td>
16: <% for column in InfoRequest.content_columns.map { |c| c.name } - [ "title", "url_title" ] %>
17: <td><%=h info_request.send(column) %></td>
|
| |
|
| |
|
| |
|
|
|