implement protect/unprotect for branches