You've got it right.  But be careful, your fuseactions have
permissions, not your fuses, so having a fuse rely on the calling
fuseaction's permissions is almost certainly not what you really want.

In general, you fuses should be entirely agnostic to the framework;
they should only be aware of variables passing in and out, as per the
fusedocs.

The permissions attribute will usually be acted upon by a
prefuseaction plugin.  And if you really do need access to the
permissions in a fuse, you should use a plugin to build a
request-scope variable that contains all the permissions needed to get
to the fuses location.  Because the permission for the fuseaction
directly containing the fuse aren't the only ones you need to care
about, you also have to worry about all the fuseactions that the
reqeust went though (via the DO) tag to get to the point of the fuse. 
I.e. you have to meet ALL those permissions in order to get them, not
just the ones on the last fuseaction.

And for completeness' sake, the permission attribute doesn't do
anything, it's merely a place to put information.  If you want to
actually use the information, you have to write that yourself (almost
certainly as a prefuseaction plugin).

cheers,
barneyb

On 7/21/05, Kevin Penny <[EMAIL PROTECTED]> wrote:
> 
> 
> For those Fuseboxers out there - this ones for you.
> 
> If I define a permission on a fuseaction i.e.
> <fuseaction name="myfuse" permission="admin">
> 
> ....
> 
> How do I reference that permission from w/in the Fuse?
> 
> i.e. How can I determine what the permission is for that fuse - how do
> I read that it needs 'admin' rights to process.
> 
> 
> 
> I just started Fuseboxing after 7 years of Cfexperience - shame on me I know
> -
> 
> 
> 
> I'm wondering if others use this technique or there
> is a simpler way out there.
> 
> So in the example:
> <fuseaction name="myfuse" permission="admin">
> ...
> 
> I can access the permission by the application variable
> application.fusebox.circuits.srm.fuseactions["#lis
> tgetat(attributes.fuseaction,2,'.')#"].permissions
> 
> where 'srm' is my root circuit alias -
> 
> 
> 
> Anyone have an easier way?
> 
> 

-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 50 invites.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212450
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to