Re: Preventing webparts from being included in pages based on role?

Tech-Archive recommends: Fix windows errors by optimizing your registry



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.
>
>
>


.



Relevant Pages

  • Re: Permissions (EVERYONE POST TO THIS)
    ... Removing Admin rights from your users is the prudent thing to do. ... without the IT Administrator providing these services and applications. ... priveledes, and before you know it, you have lost control of your network. ...
    (microsoft.public.win2000.security)
  • Re: I turned off UAC
    ... The User Access Control (UAC) can detect rootkits before they install. ... escalated to admin rights, the escalation to full-admin rights only last for the moment of escalation to do the task, and then the admin user is returned to being a Standard user again with Standard user rights only, not admin rights. ... Malware or a virus can only run under the context of the user account that is using the computer. ...
    (microsoft.public.windows.vista.general)
  • Re: XP & W2K server User rights need help
    ... accounts. ... This narrows the issue, since any admin ... > Here is another fact, this domain server had to be> replaced so a new one was created, in the old domain> server non of the users had accounts only the computers ... >>> Accounts in AD Power users with admin rights to local ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Running Applications and Adming Rights
    ... Again, I didn't give the Domain Admin rights, I am an application developer ... access rights for the install. ... >> the application folders, ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Assigning applications to clients with USER GROUP privilege
    ... > installed when a computer account belongs to the "user group" ... quite happily when users have no admin rights whatsoever (which is annoying ... rather than assigning applications, honestly. ...
    (microsoft.public.windows.server.sbs)