I have been informed that user roles and groups for users is the best
approach but how does this exactly work from a Coldfusion persepective, and
is this the best way to achieve my brief, or is the way I am planning on
going the best approach?

This is my brief, I am creating an Intranet application that features a
publishing area allowing users to add/delete/modify their own content on the
site.  Using html forms, CFFile and Oracle to hold word and pdf docs.  And
having a select form field where the user selects who should see the file
teama, teamb or everybody

However some users of the Intranet are from teama and should only be allowed
to view documents related to teama.  teamb have documents that only their
team should see.  Finally there will be some documents that users upload
that are available to everybody.

To access the Intranet the users have to log in, where their username and
password is authenticated against the user table.  The user table has
fields..

id
username
password
fname
lname
division

If correct they enter the intranet. The click on the documents link where
the following query would be run, I was thinking along the lines of adding a
where clause perhaps ?  using the info where the user selected when they
added the content - i.e. should it be see by teama, teamb or everybody?

Is this the best way to achieve this ????

<CFQUERY name="docs" datasource="intranetv8">
SELECT docid, doctitle, docsummary, docpath, views
FROM itdocs
WHERE category2='#URL.category2#'
AND
views='#what would go here that states what result of docs would be shown
based on the user logged in.  If the doc is only to be viewed by teama,
teamb or everybody???#'
</CFQUERY>



ian




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to