Tom Hughes
8dae890a76
Fix rubocop warnings
2017-10-05 19:18:38 +01:00
Andy Allan
6f89da05d1
Use current_user to represent the currently logged in user.
...
This is already used by the oauth plugin, and is a general rails convention.
2017-07-12 16:10:50 +01:00
Tom Hughes
9dafeda080
Replace render :nothing with non-deprecated alternatives
2017-06-04 22:52:41 +01:00
Tom Hughes
ff97501ed0
Remove all use of the :text option to render
...
It doesn't actually do what it says, as it sets the content type
to text/html not text/plain so is just confusing and as a result
has been deprecated in newer rails versions.
2017-06-02 19:12:05 +01:00
Andy Allan
f464e2a6e9
Suppress XML parsing errors.
...
This technique was already used in app/models/changeset.rb
This suppresses the error messages when parsing invalid XML, but
the exceptions are still raised, as tested in test_from_xml_double_lat
in test/models/node_test.rb
2016-10-26 10:35:03 +01:00
Tom Hughes
5d3ecffa28
Fix new rubocop warnings
2016-02-05 13:35:26 +00:00
Tom Hughes
2af0840ff3
Fix style issues found by new rubocop version
2015-04-14 09:38:24 +01:00
Tom Hughes
dbe165bbb3
Fix some rubocop rails style issues
2015-02-26 00:12:54 +00:00
Tom Hughes
dc2a2c8ebd
Standardise on double quoted strings
2015-02-20 19:47:26 +00:00
Tom Hughes
5cbd4038ed
Fix rubocop style issues
2015-02-20 08:56:16 +00:00
Tom Hughes
ef7f3d800c
Fix most auto-correctable rubocop issues
2015-02-20 08:56:16 +00:00
Tom Hughes
34e3e51456
Cleanup trailing whitespace
2015-02-20 08:56:16 +00:00
Tom Hughes
dd81b09eba
Update for API change in CPK 7.x
2014-07-04 19:24:25 +01:00
Tom Hughes
3880ac5de8
Replace :nothing => true
with :text => ""
...
Using `:nothing => true` confusingly actually causes a single space
to be sent as the content by rails.
2013-07-19 11:14:55 +01:00
Tom Hughes
c809f79912
Tidy up user preferences controller
2013-05-10 16:03:37 +01:00
Tom Hughes
f495da8fda
Fix a few user preferences bugs
2013-05-10 00:50:24 +01:00
Tom Hughes
071c3581e9
Disable CSRF token verification for API methods
2011-11-14 09:42:55 +00:00
Matt Amos
b8f6dbd403
Adding initial version of the OAuth token authentication method. This adds basic OAuth support for registering apps, getting and revoking keys, etc... The tokens come with 6 separate permissions bits; read/write user preferences, write diaries, write API and read/write GPS traces. Needs more tests.
2009-06-22 16:54:37 +00:00
Thomas Wood
464c490cae
Use the right keyword this time...
2009-04-09 23:18:21 +00:00
Thomas Wood
6442208841
Add exceptions for remaing cases where XML::Parser.string is used, to catch for empty strings.
...
See also r14241
2009-04-09 22:37:43 +00:00
Tom Hughes
c8ee135104
Merge 12304:14009 from trunk.
2009-03-08 13:02:37 +00:00
Tom Hughes
fa3c97d6a6
Fix for libxml 1.0.0 changes.
2009-03-08 12:44:45 +00:00
Shaun McDonald
c76e60f052
Improving the not found handling of preferences. adding a user preference test. adding some utility methods to the test helper
2008-12-12 18:54:03 +00:00
Tom Hughes
02efd7ba4a
Go back to using user_id+k as the primary key for user preferences but
...
actually using the composite primary key extension this time so that it
really works.
Also stop update_one tring to render a non-existent view, and add a
delete_one method to allow preferences to be deleted.
2008-05-04 11:18:38 +00:00
Steve Coast
4b3c207a81
add individual user preference read/write, and default all new users to having public data
2008-05-03 12:57:48 +00:00
Tom Hughes
5a6f4c5690
Use named constants for HTTP response codes.
2008-02-23 15:35:49 +00:00
Steve Coast
2e44f9ccf3
User prference system basically done
2008-02-23 13:37:36 +00:00
Steve Coast
e13337354d
preference stuff
2008-02-23 11:12:42 +00:00