permission optimization