views:

395

answers:

1

Hello i have a website in Sharepoint that is using variations. I have for sites with variation: ES, CA, EU, EN. I use authorization with roles and i put restrictions in the location tag in web.config. This is not working. Everybody can enter es/admin.

<location path="es/admin">
    <system.web>
      <authorization>
        <allow roles="administrators" />
        <deny users="*" />
      </authorization>
    </system.web>
  </location>

But, if I use one site that is not a variation, for example, like this:

<location path="prueba">
    <system.web>
      <authorization>
        <allow roles="administrators" />
        <deny users="*" />
      </authorization>
    </system.web>
  </location>

it works, there is a redirection.

If this is not possible, please give alternatives, i use a custom membership provider and role provider, so how can i restrict this site in a variation to only a group?

A: 

This is because variations aren't actual locations and so the web.config option won't work - they are a little url trick which defines what is read from the database.

Robert MacLean
but it works for a site called "prueba" which is not a variation. Everything is supposed to be in database, even the site "prueba"
netadictos
correct, variations are NOT the same as sites. variations aren't actual locations and don't work. sites are locations and thus will work.
Robert MacLean
Any alternatives? I have the roles in my database and i implement a custom membership provider.
netadictos