Move admin functions from model