Insufficient Permissions error while login to Nifi UI.

We are trying to integrate Nifi and Ranger with LDAP. Ranger is successfully integrated with LDAP and i am able to login with the AD user. But when we are trying to integrate LDAP with NIFI using Ranger we facing issues. Will elaborate it using two scenarios.

1) When we select user as "{USER}" than we can login to Nifi UI using AD users and it also gets logged in with Anonymous users. Please find below screenshot. capture1.png

capture2.png2) If we remove "{USER}" from select user and put AD user for eg "apatank". Than we am unable to login and it gives me "Insufficient Permissions" error. Please find below screenshot.capture3.png