Added check permissions function