Use admin class function to check permissions.