Cleaned up permission checking