R – Problem with Authorization and variations in Sharepoint

sharepointsharepoint-2007

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?

Best Answer

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.

Related Topic