Hi Jeff,

Thanks for your reply.  Unfortunately I needed to make it a little more
flexible so have had to look at the permissions on the nav node.  I have got
it to work by modifying the generic nav by using the following code:


<!---
check security,...
remember security is applied through the tree navigation point *not*
the individual object being rendered.
lpolicyGroupIds="#application.dmsec.ldefaultpolicygroups#"
the latter is the policy group for anonymous...
--->
<!--- determine the policy groups (or roles) this user belongs to --->
<cfif isDefined("session.dmsec.authentication.lPolicyGroupIDs") and
listLen(session.dmsec.authentication.lPolicyGroupIDs)>
        <!--- concatenate logged in group permissions with anonymous group
permissions --->
        <cfset lpolicyGroupIds = session.dmsec.authentication.lPolicyGroupIDs & 
","
& application.dmsec.ldefaultpolicygroups>
        
<cfelse>
        <!--- user not logged in, assume anonymous permissions --->
        <cfset lpolicyGroupIds = application.dmsec.ldefaultpolicygroups>
</cfif>


<cfscript>
        // initialise counters
        currentlevel=0; // nLevel counter
        ul=0; // nested list counter
        
        oAuthorisation = request.dmsec.oAuthorisation;
        oAuthentication = request.dmsec.oAuthentication;
        
        
        // build menu [bb: this relies on nLevels, starting from nLevel 2]
        for(i=1; i lt incrementvalue(qNav.recordcount); i=i+1)
        {
                iHasViewPermission =
oAuthorisation.checkInheritedPermission(objectid=qNav.objectid[i],permissionName="View",lpolicyGroupIds=lpolicyGroupIds);
        if (iHasViewPermission EQ 1)
                {
//then do the usual menu output
                }

This works, but my problem now is hiding menu options which are shown to non
logged in users but have a "logged in" version as well.  Any suggestions?

I was thinking of maybe having 2 html pages under a nav node, one the
non-logged in and the 2nd the logged-in version.  Then simply evaluating if
they are logged in, and if they are returning the 2nd Html page rather than
the 1st.  Do you think this would work?

Cheers,Duncan

--
View this message in context: 
http://www.nabble.com/Menu-and-permissions-t1407423c621.html#a3801239
Sent from the FarCry - Dev forum at Nabble.com.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/farcry-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to