2
votes

Recently I started working on Orchard CMS. I am able to create a layer with "Layer Rule" like "not url '~/some-page-url'". What my question is "is it possible to combine Layer Rule with User Role. I tried like this 'authenticated(admin)' but it is not working as i expected.

What i did: Created a simple page with title "Test Page" and created a Navigation say "Only Admin". In Widget page i choose "Authenticated Layer" and "edit" in layer rule, i changed "authenticated" to "authenticated(admin)".

Expected: Only when ever admin login the menu which i ve created is to be shown in the front end. and none other user login menu has to be hide.

"Im in the correct way or not can some one guide me in the right path." PS:Sorry for my english.

2

2 Answers

2
votes

This functionality is not supported out of the box but there is a module on the gallery that offers it:

Role Layer Rule

0
votes

This rule now exists in Orchard core since v1.10.

It was casually added in as a conversion of features in the old rules engine and not even the main developers remembered it was in there haha.