I accomplished something similar by looking how
applying roles granularly to edit/delete was done for content management in the
custom tag, DisplayList:
<cfif ThisTag.listLinks[1].mode EQ
"content" AND NOT IsUserInRole("ADMIN") AND NOT
IsUserInRole("PUBLISHER")>
<cfif Attributes.listQuery.PlumContentItem_Status[currentRow] GTE 10 OR Attributes.listQuery.PlumContentItem_UserID[currentRow] NEQ GetAuthUser()>
<cfset canEdit = FALSE>
</cfif>
</cfif>
<cfif Attributes.listQuery.PlumContentItem_Status[currentRow] GTE 10 OR Attributes.listQuery.PlumContentItem_UserID[currentRow] NEQ GetAuthUser()>
<cfset canEdit = FALSE>
</cfif>
</cfif>
I created another class of lists by copying the
code above.
<cfif ThisTag.listLinks[1].mode EQ
"mapLayers" AND NOT
IsUserInRole("ADMIN")>
<cfif Attributes.listQuery.plumUser_UserID[currentRow] NEQ GetAuthUser()>
<cfset canEdit = FALSE>
</cfif>
</cfif>
<cfif Attributes.listQuery.plumUser_UserID[currentRow] NEQ GetAuthUser()>
<cfset canEdit = FALSE>
</cfif>
</cfif>
In either case, this modifies the flag, "canEdit"
which directly decides if the edit/delete buttons appear. So here, users
can edit/delete a map layer only if they are admin or the author of the map
layer.
---Stephen Ansari
----- Original Message -----
From: "Dirk Marshall" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, February 03, 2005 6:54
PM
Subject: [plum] cf_authorize
> security very easy as far as modules and code sections. I have come
> across an issue that I am not sure how to work around. Say I have 3
> roles one has view only access, one can edit records but not delete
> and the other has admin access to the table. In other words I want to
> control which links a user sees on a list based on their role. It can
> be set by cf_authorize to show all the links or not show them but I
> can't see how to specify that I only want them to see the view link,
> etc. Another example would be I have only 1 user responsible for
> adding info but 3 who can edit the info. I would be interested in
> hearing any ideas.
>
> Thanks
>
> **********************************************************************
> You can subscribe to and unsubscribe from lists, and you can change
> your subscriptions between normal and digest modes here:
>
> http://www.productivityenhancement.com/support/DiscussionListsForm.cfm
> **********************************************************************
>
