I am using AS Security methods to restrict actions for users that are not
authorized.
I implemented this class method in my model:
class MyModel < ActiveRecord::Base
# ...
protected
def self.authorized_for_create?
false
end
end
Although MyModel is acting like expected in the rails console:
1.9.3p194 :001 > MyModel.authorized_for_create?
=> false
The create link on top of the list is still being rendered (which is not
what i expected).
When i click it, a 401 Unauthorized Error is logged in the server output.
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/-/VhRx1PwCtQcJ.
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.