Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't see not working #10

Open
alvila opened this issue Oct 21, 2010 · 3 comments
Open

Can't see not working #10

alvila opened this issue Oct 21, 2010 · 3 comments

Comments

@alvila
Copy link

alvila commented Oct 21, 2010

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 [email protected]_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.

@alvila
Copy link
Author

alvila commented Oct 21, 2010

The change was in show.html.erb

@alvila
Copy link
Author

alvila commented Oct 21, 2010

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.

@alvila
Copy link
Author

alvila commented Oct 21, 2010

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant