Hi guys,

We would like to add a custom list in Sharepoint site. And only let a
specific group users add item, but can not view those items.

I've tried the approach below.
Create 2 lists(list a and list b) with same columns. give the specific group
users contribute permission on list a, but no access on list b. And develop
an event handler on list a's itemadded event. When one item was added in list
a, copy it to list b then delete it from list a.
Unfortunately, I found the event handler did NOT work for the specific group
users. Only work for the group users who have access on list b.

Do you have any good ideas?
Br,
Alan

Re: How to accomplish this goal? by Claudio

Claudio
Tue Apr 29 09:47:41 CDT 2008

Hi,

you can use SPSecurity.RunWithElevatedPrivileges method to run the
peace of code that creates item in list B.

The problem is that the "created by" field is "system account" and not
the current user.

Claudio

On 29 Apr, 04:09, Alan <A...@discussions.microsoft.com> wrote:
> Hi guys,
>
> We would like to add a custom list in Sharepoint site. And only let a
> specific group users add item, but can not view those items.
>
> I've tried the approach below.
> Create 2 lists(list a and list b) with same columns. give the specific group
> users contribute permission on list a, but no access on list b. And develop
> an event handler on list a's itemadded event. When one item was added in list
> a, copy it to list b then delete it from list a.
> Unfortunately, I found the event handler did NOT work for the specific group
> users. Only work for the group users who have access on list b.
>
> Do you have any good ideas?
> Br,
> Alan



Re: How to accomplish this goal? by spconsultant

spconsultant
Tue Apr 29 12:08:39 CDT 2008

You could use custom Dataform/Dataview webparts through SPD to create
the user interface.
Although it is not truly security (i.e. if they know the URL they
could go there),
the users would have no navigation elements to get to the actal list.
THis is
closer to a no code solution.

On Apr 28, 10:09=A0pm, Alan <A...@discussions.microsoft.com> wrote:
> Hi guys,
>
> We would like to add a custom list in Sharepoint site. And only let a
> specific group users add item, but can not view those items.
>
> I've tried the approach below.
> Create 2 lists(list a and list b) with same columns. give the specific gro=
up
> users contribute permission on list a, but no access on list b. And develo=
p
> an event handler on list a's itemadded event. When one item was added in l=
ist
> a, copy it to list b then delete it from list a.
> Unfortunately, I found the event handler did NOT work for the specific gro=
up
> users. Only work for the group users who have access on list b.
>
> Do you have any good ideas?
> Br,
> Alan


Re: How to accomplish this goal? by Matt

Matt
Tue Apr 29 18:07:10 CDT 2008

On Apr 28, 10:09=A0pm, Alan <A...@discussions.microsoft.com> wrote:
> Hi guys,
>
> We would like to add a custom list in Sharepoint site. And only let a
> specific group users add item, but can not view those items.
>
> I've tried the approach below.
> Create 2 lists(list a and list b) with same columns. give the specific gro=
up
> users contribute permission on list a, but no access on list b. And develo=
p
> an event handler on list a's itemadded event. When one item was added in l=
ist
> a, copy it to list b then delete it from list a.
> Unfortunately, I found the event handler did NOT work for the specific gro=
up
> users. Only work for the group users who have access on list b.
>
> Do you have any good ideas?
> Br,
> Alan

Another option would be to write a console application that on some
scheduled basis copied from one list to the other. If you do that you
can specifically set the =93Created By=94 and =93Updated By=94 fields.
There=92s a nice blog article on it here:
http://blogs.msdn.com/sowmyancs/archive/2008/03/14/can-we-update-the-values-=
of-created-by-modified-by-columns-in-sharepoint-lists.aspx

-Matt
www.dotnetunderground.com
We read the manual, so you don't have too.

Re: How to accomplish this goal? by Alan

Alan
Tue Apr 29 21:12:01 CDT 2008

Thanks for your suggestion.
But I need to copy item when it is created right away.

"Matt@dotnetunderground.com" wrote:

> On Apr 28, 10:09 pm, Alan <A...@discussions.microsoft.com> wrote:
> > Hi guys,
> >
> > We would like to add a custom list in Sharepoint site. And only let a
> > specific group users add item, but can not view those items.
> >
> > I've tried the approach below.
> > Create 2 lists(list a and list b) with same columns. give the specific group
> > users contribute permission on list a, but no access on list b. And develop
> > an event handler on list a's itemadded event. When one item was added in list
> > a, copy it to list b then delete it from list a.
> > Unfortunately, I found the event handler did NOT work for the specific group
> > users. Only work for the group users who have access on list b.
> >
> > Do you have any good ideas?
> > Br,
> > Alan
>
> Another option would be to write a console application that on some
> scheduled basis copied from one list to the other. If you do that you
> can specifically set the â??Created Byâ?? and â??Updated Byâ?? fields.
> Thereâ??s a nice blog article on it here:
> http://blogs.msdn.com/sowmyancs/archive/2008/03/14/can-we-update-the-values-of-created-by-modified-by-columns-in-sharepoint-lists.aspx
>
> -Matt
> www.dotnetunderground.com
> We read the manual, so you don't have too.
>

Re: How to accomplish this goal? by Alan

Alan
Tue Apr 29 21:14:00 CDT 2008

Thanks.
I know this approach. But this is an internet facing website.

"spconsultant" wrote:

> You could use custom Dataform/Dataview webparts through SPD to create
> the user interface.
> Although it is not truly security (i.e. if they know the URL they
> could go there),
> the users would have no navigation elements to get to the actal list.
> THis is
> closer to a no code solution.
>
> On Apr 28, 10:09 pm, Alan <A...@discussions.microsoft.com> wrote:
> > Hi guys,
> >
> > We would like to add a custom list in Sharepoint site. And only let a
> > specific group users add item, but can not view those items.
> >
> > I've tried the approach below.
> > Create 2 lists(list a and list b) with same columns. give the specific group
> > users contribute permission on list a, but no access on list b. And develop
> > an event handler on list a's itemadded event. When one item was added in list
> > a, copy it to list b then delete it from list a.
> > Unfortunately, I found the event handler did NOT work for the specific group
> > users. Only work for the group users who have access on list b.
> >
> > Do you have any good ideas?
> > Br,
> > Alan
>
>

Re: How to accomplish this goal? by Alan

Alan
Tue May 06 02:45:00 CDT 2008

Thank you very much.

"Claudio B." wrote:

> Hi,
>
> you can use SPSecurity.RunWithElevatedPrivileges method to run the
> peace of code that creates item in list B.
>
> The problem is that the "created by" field is "system account" and not
> the current user.
>
> Claudio
>
> On 29 Apr, 04:09, Alan <A...@discussions.microsoft.com> wrote:
> > Hi guys,
> >
> > We would like to add a custom list in Sharepoint site. And only let a
> > specific group users add item, but can not view those items.
> >
> > I've tried the approach below.
> > Create 2 lists(list a and list b) with same columns. give the specific group
> > users contribute permission on list a, but no access on list b. And develop
> > an event handler on list a's itemadded event. When one item was added in list
> > a, copy it to list b then delete it from list a.
> > Unfortunately, I found the event handler did NOT work for the specific group
> > users. Only work for the group users who have access on list b.
> >
> > Do you have any good ideas?
> > Br,
> > Alan
>
>
>