Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Question about page permissions
Zhaan
✭✭
This might sound a bit weird, but if I wanted to revoke guest access to the All Discussions page, how would I proceed? Is it at all possible?
Using version 2.1.3.
0
Best Answer
-
peregrine MVP
I haven't tested but - try forceredirect plugin
and change
public function Base_Render_Before($Sender) { $Session = GDN::Session(); // Get the controller name $Controller = $Sender->ControllerName; $ShowOnController = array('discussioncontroller','discussionscontroller','categoriescontroller','plugincontroller','entrycontroller','activitycontroller'); // force sign in if we aren't in an approved controller if (!InArrayI($Controller, $ShowOnController)) {
to
public function DiscussionsController_Render_Before($Sender) { $Session = GDN::Session(); and remove the closing bracket for the if (!InArrayI($Controller, $ShowOnController)) {
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
6
Answers
do you mean just the topics, or viewing any discussion.
just remove the view permission from guests role.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
or use a plugin if you want some other behavior
http://vanillaforums.org/addon/forceredirect-plugin
http://vanillaforums.org/addon/550-force-guest-sign-in
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I don't want them to be able to visit the All Discussions page at all. However, I only want that single page blocked. They should be able to see every other page, even individual categories.
So.. I can't see any permissions for that specific page in the dashboard.
I haven't tested but - try forceredirect plugin
and change
to
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Thank you kind sir, I will do that.
That worked flawlessly. Thanks again!