I am using AS security methods in order to restrict actions for
unauthorized users.
I implemented a class method in my model as follows:
class MyModel < ActiveRecord::Base
# ...
protected
def self.authorized_for_create?
false
end
end
MyModel acts like expected in the rails console ...
1.9.3p194 :001 > MyModel.authorized_for_create?
=> false
... and a 401 Unauthorized Error is logged in the server output when i
click on the create link ...
But why is the create link at the top of the list still being rendered?
Is it a bug or do i miss something out?
Any ideas? Anybody?
--
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/activescaffold/-/9dCk5QfF62AJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/activescaffold?hl=en.