Advanced Permissions HELP!
Permalink
Hello, I have created a site and have a specific page that I need to use advanced permissions on. I have (what I think is) a good understanding on how the permissions SHOULD work, however, they are completely messing up.
On the page [url]http://www.scsl.com/index.php/student-resources/[/url], I have included a login block on the left side. That's working great. However, on the right side, I am trying to create a block of text that reads "You must be logged in to view this content". I want this ONLY to be visible to "Guests", so I go to "Set Permissions" on the block. I get a message at the top of the permissions window that reads "Permissions for this block are currently dependent on the area containing this block." so I click on "Override Permissions". I click on the "View Block" section and set the "Included, Access" to "Guest", then I set the "Excluded, Access" to a group I have created called "Students". I click "Save" at the bottom. At this point I see the permissions screen and I believe that this is where the error is... I have attached a screenshot. Now, the "View Block" shows nothing. It's a blank line. If I hit "Save" on this page, and go back into the permissions screen, the "View Block" says "None" and as soon as I log out from my admin account the block is no longer visible at all. Even if I login as student.
I have tried this on multiple browsers AND have cleared my site cache.
Is there a bug in the permissions module? Thanks in advance for your help.
On the page [url]http://www.scsl.com/index.php/student-resources/[/url], I have included a login block on the left side. That's working great. However, on the right side, I am trying to create a block of text that reads "You must be logged in to view this content". I want this ONLY to be visible to "Guests", so I go to "Set Permissions" on the block. I get a message at the top of the permissions window that reads "Permissions for this block are currently dependent on the area containing this block." so I click on "Override Permissions". I click on the "View Block" section and set the "Included, Access" to "Guest", then I set the "Excluded, Access" to a group I have created called "Students". I click "Save" at the bottom. At this point I see the permissions screen and I believe that this is where the error is... I have attached a screenshot. Now, the "View Block" shows nothing. It's a blank line. If I hit "Save" on this page, and go back into the permissions screen, the "View Block" says "None" and as soon as I log out from my admin account the block is no longer visible at all. Even if I login as student.
I have tried this on multiple browsers AND have cleared my site cache.
Is there a bug in the permissions module? Thanks in advance for your help.
@jd46... If you've never had experience with the permissions system in version 5.6 then please don't offer any advice. Permissions in version 5.6 are a COMPLETELY different animal then in 5.5.
http://www.concrete5.org/documentation/background/version_history/5...
http://www.concrete5.org/documentation/background/version_history/5...
I don't think you need to exclude anyone in this case. I would try to re-apply the 'View Block' permissions by clicking 'View Block again and applying that to the 'Guest' group. That should mean that only guests can see it.
UPDATE: See below
The 'Exclude' part can be used for taking people out of a group that has already been given permission. For example, say Bob is part of the 'Editors' group and you want all 'Editors' to have access but not 'Bob'. In this case you could give access to all 'Editors' and exclude 'Bob'
UPDATE: See below
The 'Exclude' part can be used for taking people out of a group that has already been given permission. For example, say Bob is part of the 'Editors' group and you want all 'Editors' to have access but not 'Bob'. In this case you could give access to all 'Editors' and exclude 'Bob'
UPDATE: I stand corrected. I just tried to do what you want to do and I needed to Exclude the "Student" group. Also, make sure you hit 'Save' on all the steps. If you just click the 'Save' button on the 'outer' dialogue, the 'inside' stuff doesn't get saved. Also, when you make changes to the permissions, a blue 'Approve Version' bar shows up where you need to click to approve the changes (that part is odd).
Thanks so much for the quick reply. I believe that I'm hitting save on the correct steps, however, I went ahead and recorded a quick screencast of what it was doing. Please check my work though and make sure that I'm performing the steps necessary to make this happen.
http://screencast.com/t/HRVLxaCBO...
Thanks again!
http://screencast.com/t/HRVLxaCBO...
Thanks again!
That is odd.
When I 'Exclude' a group, they show up in red beside the groups that have access.See attached.
Have you turned off all the C5 internal caching? (Dashboard->System and Settings->Cache and Speed Settings)
Also... try something. Right before you save the settings for the last time (the moment where you should have the excluded groups in red), right-click on the page and choose 'Inspect Element' and look at the 'Console' tab to see if there are any JavaScript errors being thrown. Leave the dialogue window open while you do this.
(I have to drive 6 hours, round-trip to pick up my son at the airport for Christmas so I'm out for the rest of the evening. I'll check in tomorrow)
When I 'Exclude' a group, they show up in red beside the groups that have access.See attached.
Have you turned off all the C5 internal caching? (Dashboard->System and Settings->Cache and Speed Settings)
Also... try something. Right before you save the settings for the last time (the moment where you should have the excluded groups in red), right-click on the page and choose 'Inspect Element' and look at the 'Console' tab to see if there are any JavaScript errors being thrown. Leave the dialogue window open while you do this.
(I have to drive 6 hours, round-trip to pick up my son at the airport for Christmas so I'm out for the rest of the evening. I'll check in tomorrow)
So I didn't have any luck... I turned off all caching done by C5, I tried to catch any javascript errors in the inspect elements window with no avail. Another piece to this puzzle is that I am on a shared host and have lots of sites hosted there. I went to another site that is running C5 (same version) and performed the same permission task that I was trying to implement on this site, and it worked perfectly.
This leads me to think either it's a) something with my template that is goofing with the permissions module, or b) something that went weird with this installation of C5. It may be worth mentioning that all other C5 installs that I have done were done by hand and this last site that I'm having permissions issues with was done via Softaculous on the host.
Would you advise that I try to rerun the setup, or would you simply back up the database and do a fresh install of C5 to fix this issue? Thanks again for your input.
This leads me to think either it's a) something with my template that is goofing with the permissions module, or b) something that went weird with this installation of C5. It may be worth mentioning that all other C5 installs that I have done were done by hand and this last site that I'm having permissions issues with was done via Softaculous on the host.
Would you advise that I try to rerun the setup, or would you simply back up the database and do a fresh install of C5 to fix this issue? Thanks again for your input.
Something else to check. Make sure you have C5 set to display PHP errors by going to 'Dashboard->System and Settings->Debug Settings'
Now, before you click the final 'Save' button on your permissions dialogue, right-click on the page and choose 'View Source' and scroll down to the very bottom to see if it's spitting out a PHP error.
Also, check your logs at 'Dashboard->Logs'
Also check your Apache server logs through your Control Panel.
You can try to run the update script again. Won't hurt anything but if there is a corrupt file in the file system the update script won't fix that. You might need to grab the latest 5.6 zip from the concrete5 website and upload just the concrete folder and replace the concrete folder on the server. I usually rename the existing concrete folder 'concreteOld' before I upload the replacement concrete folder so I don't actually overwrite the existing concrete folder.
Now, before you click the final 'Save' button on your permissions dialogue, right-click on the page and choose 'View Source' and scroll down to the very bottom to see if it's spitting out a PHP error.
Also, check your logs at 'Dashboard->Logs'
Also check your Apache server logs through your Control Panel.
You can try to run the update script again. Won't hurt anything but if there is a corrupt file in the file system the update script won't fix that. You might need to grab the latest 5.6 zip from the concrete5 website and upload just the concrete folder and replace the concrete folder on the server. I usually rename the existing concrete folder 'concreteOld' before I upload the replacement concrete folder so I don't actually overwrite the existing concrete folder.
Ease off mhawke, just trying to help and at the time no one had responded to this query so I though even my limited knowledge might come handy. Anyway I just wasn't aware of the change in permissions, my life isn't centered around C5 updates just so you know.
My apologies. I was being uncharacteristically forceful because the new permissions system is MUCH more complicated than before and outdated advice can lock developers out of their own systems and generally cause a lot of confusion. I was leaving on a 6 hour trip to the airport and I didn't have time to be diplomatic. If you look at my history of posts, you will see that I don't normally operate that way.
To display a message viewable only to guests you could use
<?php $u = new User(); if (!$u->isLoggedIn()) { ?> <p>You must be logged in to view this content</p> <?php } ?>
That will certainly work but it doesn't fix his broken permissions system. I'm afraid that if we don't fix it, something more serious will befall the website.
Haha true I did get locked out but not because I was toying around with permissions, anyway go on and help the OP I'll stop here. I'm not here to pick petty fights.
I am not convinced there is a problem with permissions..
If I have understood the OP correctly he has given permissions to Guests to view a block and then tried to deny permissions from a certain group,
By giving permissions to guests he has by implication given permissions to "All" including groups,
It could be that he has confused the permissions system in doing so,
I am not sure about the permissions in 5.6 but I am quite sure in previous Concrete versions this is not possible,
If I have understood the OP correctly he has given permissions to Guests to view a block and then tried to deny permissions from a certain group,
By giving permissions to guests he has by implication given permissions to "All" including groups,
It could be that he has confused the permissions system in doing so,
I am not sure about the permissions in 5.6 but I am quite sure in previous Concrete versions this is not possible,
You are correct in saying that you could not 'exclude' prior to 5.6. Richgable is working with version 5.6. When I duplicate to steps in the OP's screencast, the excluded 'Guests' are shown in red just before saving the permissions for the final time. The fact that richgable's system fails to show any of the groups (allowed or excluded) in that final dialogue window tells me there is something wrong that needs to be fixed.
Sorry for the delay in getting back. Been out of town and away from the computer entirely. OK, I made sure the debugging was on in C5... then did a "View Page Source" just before hitting "Save" on the last page and get this... not seeing any errors.
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>south carolina school of leadership :: student resources</title> <meta name="description" content="" /> <meta name="generator" content="concrete5 - 5.6.0.2" /> <script type="text/javascript"> var CCM_DISPATCHER_FILENAME = '/index.php'; var CCM_CID = 178; var CCM_EDIT_MODE = true; var CCM_ARRANGE_MODE = false; var CCM_IMAGE_PATH = "/concrete/images"; var CCM_TOOLS_PATH = "/index.php/tools/required"; var CCM_BASE_URL = "http://www.scsl.com";
Viewing 15 lines of 369 lines. View entire code block.
Also, I did rename the 'concrete' folder to 'concrete_old' and re-uploaded the folder from the latest ZIP file. Unfortunately, this did nothing as well.
I'm currently setting up a duplicate environment on some more webspace that I have to see if a complete reinstall of the site will do the trick. I will let you know what i find out.
I'm currently setting up a duplicate environment on some more webspace that I have to see if a complete reinstall of the site will do the trick. I will let you know what i find out.
Once you re-uploaded the new core, did you re-run the upgrade script?
I did not rerun the script... would that be run from the Upgrade folder?
Here's a video of what the system is doing... it shows that indeed there is something wrong with the permissions portion of the site. Instead of showing the red group that is to be excluded, the field goes completely blank...
http://screencast.com/t/HRVLxaCBO...
Thanks so much
http://screencast.com/t/HRVLxaCBO...
Thanks so much
Well, you're not going to believe this but it is a bug already reported in the Bug Tracker (Developer->Bug Traker on concrete5.org). The problem happens if the area name has spaces in it such as 'Left Sidebar'.
http://www.concrete5.org/developers/bugs/5-6-0-2/cant-set-permissio...
I can confirm this bug on my own system. I tried to set permissions on an area called 'Left Column' and it failed just like your system but if I set permissions on an area called 'Main' all works well. I am going to install the new core from GitHub and see if they've addressed the issue.
http://www.concrete5.org/developers/bugs/5-6-0-2/cant-set-permissio...
I can confirm this bug on my own system. I tried to set permissions on an area called 'Left Column' and it failed just like your system but if I set permissions on an area called 'Main' all works well. I am going to install the new core from GitHub and see if they've addressed the issue.
Man, that is really funny. I had JUST discovered that it did work in some of my elements and not others. I would be willing to bet that renaming the elements to something without spaces would make them all work... Now, the big question, once I change the name on my template to something without spaces, I'm guessing that I'm going to loose ALL of that content that's in those areas... Is there any way to move that content into the new area without losing any content?
I just fixed mine. Go into your template and add an area below the area with the spaces but name it without spaces. Then fire up your page in edit mode and 'Move' the old contents to your new area. Then open your template up again and delete the old area.
Got it. Thanks so much!! I owe you big time! I was about to pull out my last chin-hair!
I should have known better and checked the Bug Tracker a few days ago. Live and learn.
If it's possible for you, PM credentials with enough access and I'll try to help, I'm fairly familiar with Advanced Permissions since I've been toying around with them on my own website.
Lastly, I don't recognize the AP(advanced permissions) menu, I'm running an old C5 version, that why? :S