Mura CMS: Hide menus for pages with restricted access

ColdFusion , Railo 5 Comments »

I have just recently been playing with mura in the last 2 days which I decided to use for the new CFLIVE website.

One function I need is to have menus/pages which will only be visible to logged in users. While Mura does allow you to restrict access to pages, it still displays the menus/links and allows access to the page but gives a login prompt instead of the page content, I could not find any way to hide the menu links as well.
On the Mura forums even BlueRiver themselves have suggested the only option is to create a hard coded menu instead, which really seems like a terrible work around to me, although that reply was 5 years old, so perhaps there was no better way to do it back then.

Anyway  I found a better solution, but please be aware as I said, I have only been using Mura for 2 days, and have no more than a few hours experience with Mura code at this point, so if there is a better way of doing this, feel free to let me know.

Open the file /requirements/mura/content/contentRenderer.cfc

find the "allowlink function, around line 287 and copy this function to your site's contentRenderer.cfm
[site root]/default/includes/contentRenderer.cfc

now simply add the <cfelseif> block below, this will stop restricted pages showing in the menu if the user is not logged in.


<cfif  arguments.loggedIn and (arguments.restrict)>

                        <cfif arguments.restrictgroups eq '' or listFind(session.mura.memberships,'S2IsPrivate;#application.settingsManager.getSite(variables.event.getValue('siteID')).getPrivateUserPoolID()#') or listFind(session.mura.memberships,'S2')>
                                    <cfset allowLink=True>
                            <cfelseif arguments.restrictgroups neq ''>
                                    <cfset allowLink=False>
                                    <cfloop list="#arguments.restrictgroups#" index="G">
                                        <cfif listFind(session.mura.memberships,'#G#;#application.settingsManager.getSite(variables.event.getValue('siteID')).getPublicUserPoolID()#;1')>
                                        <cfset allowLink=true>
            <cfelseif !arguments.loggedin and arguments.restrict>
                <cfset allowLink=false>


Do you want ColdFusion 10 ?

ColdFusion , News 18 Comments »

I have recently been contacted by Rakshith Naresh from Adobe who has expressed an interest in possibly supporting cfmldeveloper and CFLIVE with a CF10 license (no doubt Adam Cameron’s digs on twitter contributed to this :-) ) . However as there has been very little interest in CF10 so far (I can count on 1 hand the number of people who have asked me about CF10 so far) he doesn’t think it would be warranted at this time, which is fair enough I guess as that is their decision, although personally I would have thought they would want to "get it out there" as much as possible regardless.
It does also beg the question "Why has no-one asked about CF10, is it through ignorence because you do not know about CF10 because Adobe have not marketed it very well, is it because you are really not very active in the community and do not keep up to date on what's new, or because you just do not care and are happy with CF9? It would be good if folks could leave some feedback on that too.

Anyway In order for this to change I will need to get some feedback/requests from you lot if you would like to see CF10 supported on cfmldeveloper and CFLive. In which please just add your comments to this blog post (or use the feedback button on the left of the site) expressing your interest so I can pass this along to Adobe for their consideration, cheers.

If you do not know what’s new in CF10, here are some links.

A new realtime CFML code testing tool

ColdFusion , Railo 7 Comments »

Last week while answering some coding questions on a discussion list I needed to post some example code, which meant if I wanted to test the code first then I needed access to a cf server. As I tend to do most of my list replies etc on my mobile device, I do not have a local CF installation to test with.
With PC sales dropping and mobile devices sales far exceeding PC sales these days, I would imagine most other people are doing most of their community activity on their mobile device as well, apart from those folks that seem to spend their entire day social networking rather than working.

I then considered how often I have seen other devs posting code snippets and saying "this is not tested code as I do not have access to a cf server right now", so it must be a fairly common scenario.

This make me think to myself "wouldn't it be handy if there was a web page I could go to where I could quickly just type some code into a form, submit it and the code would be executed and tell me if there were any errors and give me some debug output, surely someone has written such a tool ?
So I Googled it and was surprised that such a tool did not exist, that I could find.

Well it has been a long time since I wrong any kind of app as I simply do not get the time to do coding these days, so I thought I would write such a tool myself, and here it is, please give it a try and leave me some feedback, feel free to try and hack it and find any vulnerabilities or bugs, as long as you let me know about them.

Railo 4 now available

News , Railo 1 Comment »

Hey guys, I have now installed Railo 4 on the developer server, however this has somehow broken Railo 3 in the process.

I will work on getting this fixed later today, in the mean time, you can switch over to Railo 4  by making the following changes to your web.config.

As this is a new version will need to setup your Railo admin settings again and set your web admin password.

Here is a link to the new FAQ article explaining how to example railo.

Account Cancellations

News , websitepanel No Comments »

Last week I was in the process of setting up all the notification emails on the new storefront. Unfortunately it seems I forgot to check a box somewhere on the form  and as a result it sent out the email to everyone right away. Oops, sorry for that.

Just to put everyone's mind at rest, no accounts have actually been canceled or deleted yet, although this is due to happen, so keep on reading.

As users will know, some months back I migrated everyone over to a new storefront app to handle all the signups due to the fact that the eCommerce system built into WebsitePanel was do dreadful. This new Icloud system is still in beta and I am still testing it and reporting back any bugs and issues I find.

While I have been setting this up, most users have now gone way past their 1 year renewal date and would not have received any renewal reminders as I had not set this up yet, which is what I have been doing last  week.

what action do I need to take ?

If you are a new user and have only signed up in the last few months using the new storefront, then there is nothing for you to do.

For the rest of you who have been users for more than 1 year and were migrated over from the old eCommerce system, if you are still using your developer hosting then you will need to login to the storefront and renew your subscription to keep it active, if not then I will presume you are no longer using it and it will get canceled/deleted.

Why do you need to renew your FREE subscription you may ask ? Because there is a huge churn on cfmldeveloper, hundreds of users signup each year and then abandon their account or simply never use it, which wastes system resources, so the renewal process is to get rid of all those unused accounts and free up resources for everyone else.

To remind you,  your login details for the storefront are the same as your WebsitePanel login details. If you do not know your login details then please use the "lost password" link on the login page.

The deadline for this is the end of June, but I will also be sending out a direct email to all users as well.


Powered by Mango Blog. Design by Russ Michaels and inspired by styleshout
RSS Feeds