Only check IP addresses for anonymous note comments
This commit is contained in:
parent
f434b68d2f
commit
cbc4c5352d
1 changed files with 2 additions and 2 deletions
|
@ -55,7 +55,7 @@ class NotesController < ApplicationController
|
||||||
# Create a new note
|
# Create a new note
|
||||||
def create
|
def create
|
||||||
# Check the ACLs
|
# Check the ACLs
|
||||||
raise OSM::APIAccessDenied if Acl.no_note_comment(request.remote_ip)
|
raise OSM::APIAccessDenied if current_user.nil? && Acl.no_note_comment(request.remote_ip)
|
||||||
|
|
||||||
# Check the arguments are sane
|
# Check the arguments are sane
|
||||||
raise OSM::APIBadUserInput, "No lat was given" unless params[:lat]
|
raise OSM::APIBadUserInput, "No lat was given" unless params[:lat]
|
||||||
|
@ -91,7 +91,7 @@ class NotesController < ApplicationController
|
||||||
# Add a comment to an existing note
|
# Add a comment to an existing note
|
||||||
def comment
|
def comment
|
||||||
# Check the ACLs
|
# Check the ACLs
|
||||||
raise OSM::APIAccessDenied if Acl.no_note_comment(request.remote_ip)
|
raise OSM::APIAccessDenied if current_user.nil? && Acl.no_note_comment(request.remote_ip)
|
||||||
|
|
||||||
# Check the arguments are sane
|
# Check the arguments are sane
|
||||||
raise OSM::APIBadUserInput, "No id was given" unless params[:id]
|
raise OSM::APIBadUserInput, "No id was given" unless params[:id]
|
||||||
|
|
Loading…
Add table
Reference in a new issue