• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 485
  • Last Modified:

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?
0
UmweltIT
Asked:
UmweltIT
  • 2
  • 2
1 Solution
 
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
 
UmweltITAuthor Commented:
Rated as a B only because I needed to learn more about C# coding
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now