Open alvila opened 13 years ago
The change was in show.html.erb
Ok found the option can_view so I changed to <% if User.current.can_view?(@page) %>
The option in lib/wiki_permisions.rb result.class == WikiPage and not User.current.can_view? result seems not to do what it should do.
Ok found it, the permission works only on sub-page not on the main one. Now the issue is that if the user is not defined, it throws internal error.
I don't know if this is my mistake or an issue but the can't see permission actually doesn't work.
I fixed it by adding an option on the first line <% if !@page.users_by_level(0).include?(User.current) %> and end on the last line, but this doesn't seem right.
Anyway is there any way of making the can't see default for not specified users? It would be useful to add this feature. I can do it if you like.