Re: Preventing webparts from being included in pages based on role?
- From: "Gary A. Bushey [SPS MVP]" <bushey@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 17 Aug 2005 06:32:29 -0400
If the user has admin rights to the page and the web parts are installed for
the entire site then they will be able to add those parts to the page.
There are a couple of options here.
1) Modify the web.config file so that the web parts are marked as safe but
only give the DWP files to those people that should use them and allow them
to import the web parts rather than having the web parts show up in the
gallery.
2) Modify the web part code itself so that it checks for the proper rights
and if the user does not have them then either do nothing or show an error
message.
--
Gary A. Bushey
SPS MVP
bushey@xxxxxxxxxxxxxx
"Peter Rilling" <peter@xxxxxxxxxxxxxxxxxx> wrote in message
news:eUP74droFHA.3256@xxxxxxxxxxxxxxxxxxxxxxx
> Okay, how can I restrict the usage of a webpart to those with certain
> roles, like admin?
>
> To be more specific, I have a web part that will be hosted on certain
> pages (that only the admin can use). These parts do stuff that I do not
> want a normal person to do such as creating accounts in a database.
> Normal users have the ability to create pages and add controls, but I do
> not want them to have the ability to add my parts to their pages. If they
> did, then they would have those high privileges.
>
>
>
.
- References:
- Preventing webparts from being included in pages based on role?
- From: Peter Rilling
- Preventing webparts from being included in pages based on role?
- Prev by Date: Re: Why "Contacts" Web Part is not available on page other than Ho
- Next by Date: Re: Loading a webpart from another webpart
- Previous by thread: Preventing webparts from being included in pages based on role?
- Next by thread: Re: Preventing webparts from being included in pages based on role?
- Index(es):
Relevant Pages
|