Can I Use C# to filter a WSS 3.0 Form Library by Windows Logins?

Hi Experts,

My brain says it's feasible, but not being able to program a line of C# has run me into an issue.

My company is starting to use InfoPath 2007 to develop electronic forms for a number of our workflows.  These we are storing in Form Libraries within our WSS 3.0 intranet site.  The development and such has gone smootly, up to now.

One of our forms require a level of privacy.  We want the form available to only the creator, our compnay's Directors and Manager (easy done) and a set of 2 other people, as assigned within the form.  For example:

Form 1 is initiated by Bob, who assigns the form to his superiors Mary and Mike.  Company Directors Bill and Jane, as well as General Manager John definately need to see ALL forms (this has been handled with Sharepoint permissions).  ONLY the people mentioned above should be allowed to see Form 1; if another user Matt comes into the form Library, he shouldn't be able to see Form 1.

Without using WSS permission controls (as this would have to be changed for every form that goes into the library) can permissions on indivdual library items be set?

I was thinking it would be possible to retrieve the logon credentials of a user at library page load, check them against the names listed on each form (which can be retrieved from library columns), and only display the forms that contain the user.  Am I right in thinking this is possible?  If so, how would I go about it?
UmweltITAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

techExtremeCommented:
You can register a event handler against the concerned document library which when a form is added/modified can modify its permission as per your need automatically. This is very useful. If this is not what you want lets discuss.
0
UmweltITAuthor Commented:
That sounds pretty close to what I'd be interested in.  Would I be able to find/code sucg an event handler with minimal fuss?
0
techExtremeCommented:
Here's ready code which you can utilize
http://www.sharepoint-tips.com/2007/03/sample-event-handler-to-set-permissions.html

It shows many more things, but you should take interest in the one which shows 'how to change items' permissions'. Follow it, understand it and implement.
Happy COding
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
UmweltITAuthor Commented:
Rated as a B only because I needed to learn more about C# coding
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.