Refactored permissions edit view and edit controller action