Refactoring: extract attributes preparing in auth and role_permission.