[Git][noosfero/noosfero][master] 2 commits: Validates if the unauthenticated user tries to access the user's profile without…

Rodrigo Souto gitlab at mg.gitlab.com
Fri Jun 8 11:23:59 BRT 2018


Rodrigo Souto pushed to branch master at Noosfero / noosfero


Commits:
5736358e by mendesiasmin at 2018-06-01T13:25:30Z
Validates if the unauthenticated user tries to access the user's profile without passing a public page

- - - - -
7fe2b596 by Rodrigo Souto at 2018-06-08T14:23:54Z
Merge branch 'public-access-profiles' into 'master'

Validates if the unauthenticated user tries to access the user's profile without…

See merge request noosfero/noosfero!1508
- - - - -


1 changed file:

- plugins/public_access_restriction/lib/public_access_restriction_plugin.rb


Changes:

=====================================
plugins/public_access_restriction/lib/public_access_restriction_plugin.rb
=====================================
--- a/plugins/public_access_restriction/lib/public_access_restriction_plugin.rb
+++ b/plugins/public_access_restriction/lib/public_access_restriction_plugin.rb
@@ -58,6 +58,7 @@ class PublicAccessRestrictionPlugin < Noosfero::Plugin
 
   def linked_on_portal_news(environment, params, profile)
     return false unless params['controller'] == 'content_viewer' && params['action'] == 'view_page'
+    return false if params['page'].nil?
     article = profile.articles.find_by(path: params['page'].join('/'))
     portal = environment.portal_community
     portal.articles.



View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/36a97f6f4cf75467fa0ef3fc8b9c2236b1a3be54...7fe2b5960b5840b15b9a1d02a5a537b7aed8f60f

-- 
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/36a97f6f4cf75467fa0ef3fc8b9c2236b1a3be54...7fe2b5960b5840b15b9a1d02a5a537b7aed8f60f
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20180608/30ef01b5/attachment-0001.html>


More information about the Noosfero-dev mailing list