#15 ✓resolved
Romain

nill attribute as argument to if_attribute in authorization_rules.rb

Reported by Romain | June 24th, 2009 @ 11:54 AM

Hi,

I've a problem when passing nill as argument to if_attribute, the SQL query aren't right :

authorization_rules.rb

authorization do

  ...
  has_permission_on :message, :to => :read do
      if_attribute :picture_content_id => nil
  end
  ...

end

SQL query

SELECT ... WHERE ...

  (`messages`.`picture_content_id` = NULL)
  ...

I would expect the following syntax

  ...
  (`messages`.`picture_content_id` IS NULL).
  ...

Do you have any idea or workaround to solve this problem ?

Thanks a lot.

Romain.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

By now, decl_auth is using the GitHub issue tracker as well. Please use the one over there: http://github.com/stffn/declarative_authorization/issues

People watching this ticket

Pages