conditionally set perms