dmFile permissions

1 view
Skip to first unread message

Chris Roth

unread,
Oct 22, 2007, 6:57:30 PM10/22/07
to farcry-dev
Does anyone have some code they can share on adding permissions to
dmfile objects?

I am considering adding a "permisssions" category to the category tree
and then extending dmProfile to hold similar permissions, thne
checking for them in download.cfm

Ideas, examples?

Chris

Jake Churchill

unread,
Oct 22, 2007, 7:15:50 PM10/22/07
to farcr...@googlegroups.com
I just posted a blog today about this. Not this exactly but I posted a way
to check permissions on an item outside the Site Tree such as dmNews. You
could create a specific policy group related to this and then check for it
in the way I describe here:

http://jake.cfwebtools.com/index.cfm/2007/10/22/Farcry-View-Permissions-Outs
ide-the-Tree

Jake

Chris Roth

unread,
Oct 22, 2007, 8:05:35 PM10/22/07
to farcry-dev
Jake,

Thanks, I think Ican use this for some other content types I need to
protect outside the tree, but for my dmFile onjects, I am not sure how
to incorporate this.. the download.cfm wouldnt have a navid to look at
view permissions for right?

Jake Churchill

unread,
Oct 22, 2007, 8:13:12 PM10/22/07
to farcr...@googlegroups.com
If the file is in the file library there will be an object id. There should
be anyway. Check the dmFile table.

-----Original Message-----
From: farcr...@googlegroups.com [mailto:farcr...@googlegroups.com] On
Behalf Of Chris Roth
Sent: Monday, October 22, 2007 7:06 PM
To: farcry-dev

Chris Roth

unread,
Oct 23, 2007, 12:39:24 PM10/23/07
to farcry-dev
Jake,

I am probably over or under thinking this.

I dont think I can use the FC permissions method..

I need to be able to define the access to a file objects individually
and not at the "type" level..

For example I may have these types of users..

1. Anonymous
2. Member (ie. a register user)
3. Sales Rep
4. Service Rep

Example..

I have a "usermanual.pdf" dmFile object, and I want it downloadable by
say Members, and Service Reps.


I have a "planningguide.pdf" that should be viewable by all but
Anonymous

I have a "brochure.pdf" viewable by all.

Obviously the brochure.pdf could have no permissions making it view
able by all, but for the others?

I dont want to make this harder than it needs to be so if I am not
seeing an easy solution please advise, I was considering adding to the
category tree something like:

AccessControl
- Member
- Sales Rep
- Service Rep

Then extending dmFile and dmProfile to have a property "accessControl"

The somehow gettting this list into something like
session.dmsec.authentication.laccessControlIDs or
session.dmprofile.laccessControlIDs


Am i overthinking this or not leveraging something?

Chris Roth

unread,
Oct 23, 2007, 12:44:13 PM10/23/07
to farcry-dev
Or, should I just extend dmFile to have a lPolicyGroupIDs property
then use formtools to somehow generate a list of checkboxes... then
check the list on download.cfm before running <farcry:download>

Jake Churchill

unread,
Oct 23, 2007, 1:53:55 PM10/23/07
to farcr...@googlegroups.com
That is certainly an option and probably a good one. The only other thing I
can think of is some type of manual categorization that mimics permissions.

_____

Jake Churchill
Team Leader
11204 Davenport, Ste. 100
Omaha, NE 68154
http://www.cfwebtools.com
402-408-3733 x103


-----Original Message-----
From: farcr...@googlegroups.com [mailto:farcr...@googlegroups.com] On
Behalf Of Chris Roth
Sent: Tuesday, October 23, 2007 11:44 AM
To: farcry-dev
Subject: [farcry-dev] Re: dmFile permissions

Or, should I just extend dmFile to have a lPolicyGroupIDs property
then use formtools to somehow generate a list of checkboxes... then
check the list on download.cfm before running <farcry:download>


No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.488 / Virus Database: 269.15.6/1086 - Release Date: 10/22/2007
7:57 PM

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.488 / Virus Database: 269.15.6/1086 - Release Date: 10/22/2007
7:57 PM


Whiterod, David (PIRSA)

unread,
Oct 25, 2007, 9:08:11 PM10/25/07
to farcr...@googlegroups.com
Hi Chris,

I have a (compete but not rollout out) plugin - 'Secure Files' - that does just this.

SecureFiles:

* Extends dmFile to add a list of allowable policy groups for each file
* Uses FT's ftsecure option - this will save files outside the webroot in <project>/securefiles/dmfile/...
* Uses a new version of download.cfm that checks the files assigned group permissions, then (if OK) hands off to the core's download.

Install as per any plugin then update your project's www/download.cfm to use the plugin's version, ie:

<cfimport taglib="/farcry/plugins/secureFiles/tags" prefix="secureFiles">
<secureFiles:download>

I've attached a zip - let me know what you think.

Cheers

David

-----Original Message-----
From: farcr...@googlegroups.com [mailto:farcr...@googlegroups.com] On Behalf Of Chris Roth
Sent: Wednesday, 24 October 2007 2:14 AM
To: farcry-dev
Subject: [farcry-dev] Re: dmFile permissions

secureFiles.zip

Chris Roth

unread,
Oct 29, 2007, 12:24:58 PM10/29/07
to farcry-dev
David,

I looked the plugin over and it looks like just what I need, I'll
deploy it and let you know.

Thanks.

Chris

Reply all
Reply to author
Forward
0 new messages