Added permission checking to action