Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
access denied only for some formats when accessing via api-key
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
michael  
View profile  
 More options May 12 2010, 12:04 pm
From: michael <eniwetok...@googlemail.com>
Date: Wed, 12 May 2010 09:04:40 -0700 (PDT)
Local: Wed, May 12 2010 12:04 pm
Subject: access denied only for some formats when accessing via api-key
Hi,
a action to which access is controlled via acl9 responds to several
formats.

If accessing using a api-key (authlogic defaults) acl9 denies access
to some formats and to others not.
e.g. accessing .html or .json works but not for .xml or others (non
standardised).

If accessing via cookia authentication (or normal browsing) access is
(as defined) allowed in all necessary cases (but indifferent to the
format)...

has anybody exerienced similar problems?

as a followup questions: Is there a way to have different access rules
for different formats (whilst same action)?

thanks,
 Michael


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sharad Jain  
View profile  
 More options May 12 2010, 1:13 pm
From: Sharad Jain <shaanj...@gmail.com>
Date: Wed, 12 May 2010 12:13:54 -0500
Local: Wed, May 12 2010 1:13 pm
Subject: Re: access denied only for some formats when accessing via api-key

> as a followup questions: Is there a way to have different access rules
> for different formats (whilst same action)?

one way would be:

access_control do
   actions :show do
     allow Role::BATCH_JOB, :if => format_xml?
   end
end

private
def format_xml?
   params[:format] == "xml"
end


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »