moov2 / Orchard.ActiveDirectoryAuthorization

Module for Orchard CMS that handles authorization for active directory users.
19 stars 15 forks source link

Can't impersonate site owner #16

Open thekaveman opened 8 years ago

thekaveman commented 8 years ago

Typically setting the authenticated user for a request isn't necessary, as indicated by the code comment in ActiveDirectoryAuthenticationService:

public void SetAuthenticatedUserForRequest(IUser user)
{
    // users are automatically authenticated via active directory.
}

However there is at least one case where we'd like to use this: when we are trying to impersonate the SiteOwner user, like in the export file command from Orchard.ImportExport module.

The fix is relatively simple, I can submit a PR; however I would like to do so on top of #14 if possible.

peterkeating commented 7 years ago

I've merge #14 now so feel free to add any changes, I'll be sure to be more on top of pull requests from now on and get the package update in the gallery frequently too.