Moved gateway plugin permissions functions