Expand my Community achievements bar.

SOLVED

Is it possible to restrict content editing in classic mode ?

Avatar

Level 2

Hi All,

Recently we got requirement from client, client want to restrict content authoring in classic mode (cf#) based on usergroup .Is it possible to restrict like that ?

Client want users need to authoring content in touch ui mode not in classic mode.,Even if users forcibly open page in classic mode(page open with  CF#) we should not allow the access.

1 Accepted Solution

Avatar

Correct answer by
Level 8

You need to use sling filters and need to follow below design.

Steps :

  • As you are using author instance so you must execute only in author environment. you must add this in run mode configurations
  • Inside doFilter() method you need to check the URL contains "cf#" or not. and it is good to check run mode also author or publish along with "cf#"
  • Use configuration manager to configure groups
  • Read groups from the configurations and iterate
  • Now get the username and check whether he is in a particular group or not
  • If the user in a specified group then you can perform redirection to touch UI page, by replacing "cf#" to "editor.html"

Example :

http://keysandstrokes.info/aem-sling-filters/

View solution in original post

4 Replies

Avatar

Community Advisor

Hi,

You can do this with the help of filters.

As soon as user arrives in classic UI, it will be redirected to Touch UI.

E.g. Redirect user to classic UI welcome screen based on userid/group

https://github.com/arunpatidar02/aem63app-repo/blob/master/java/CustomScreenFilter.java

You can do similar.



Arun Patidar

Avatar

Correct answer by
Level 8

You need to use sling filters and need to follow below design.

Steps :

  • As you are using author instance so you must execute only in author environment. you must add this in run mode configurations
  • Inside doFilter() method you need to check the URL contains "cf#" or not. and it is good to check run mode also author or publish along with "cf#"
  • Use configuration manager to configure groups
  • Read groups from the configurations and iterate
  • Now get the username and check whether he is in a particular group or not
  • If the user in a specified group then you can perform redirection to touch UI page, by replacing "cf#" to "editor.html"

Example :

http://keysandstrokes.info/aem-sling-filters/

Avatar

Level 2

Thank you Rajas, I will try with your suggested approach and update you.