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

Filter unauthorized BlockData for visitors?

$
0
0

FilterContentForVisitors only works for IContent. Is it possible to also filter blocks based on the site visitor's roles? Say that a certain block type is only applicable for authenticated users and should not be rendered for anonymous visitors? How would this be achieved?

[Access(Roles = "SomeCleverRoleName")]
[ContentType(GUID = "FD8AA809-9114-4518-8AFA-B2D4B2D82474")]
public class NotForEveryoneBlock : BlockData
{
}


Viewing all articles
Browse latest Browse all 6894

Trending Articles