Quantcast
Channel: Optimizely Search & Navigation
Viewing all articles
Browse latest Browse all 6894

Add CmsAdmins claim in custom Owin middleware

$
0
0

Hello!

I´m trying to get editor mode to work with a custom IODC provider solution we are using. I thought I´d try to add a CmsAdmins claim to the principal in an Owin middleware.

* I based solution mostly on information in this article: https://world.episerver.com/documentation/developer-guides/CMS/security/federated-security/

* I´ve made sure CmsAdmins role is given access to editor pages in web.config: 

<location path="EPiServer">
<system.web>
<authorization>
<allow roles="WebEditors, CmsAdmins" />
<deny users="*" />
</authorization>
</system.web>
</location>

<location path="EPiServer/CMS/admin">
<system.web>
<authorization>
<allow roles="WebEditors, CmsAdmins" />
<deny users="*" />
</authorization>
</system.web>
</location>

* I add CmsAdmins claim to principal in an Owin middleware like so:

Despite this I still get 401 unauthorized when I try to access /episerver. Is something wrong with the CmsAdmins claim on principal? 

Update: When I check PrincipalInfo.HasAdminAccess value is true.


Viewing all articles
Browse latest Browse all 6894

Trending Articles