rewrite roleAttachment