admin improved
added function to control whether user can set flag or not