def can_use_dynamic_editing(self, user):
        return not self.editing_locked and\
            (not self.editable_only_by_owners and
             user.has_perm(
                 'compilacao.change_dispositivo_edicao_dinamica') or
             self.editable_only_by_owners and user in self.owners.all() and
             user.has_perm(
                 'compilacao.change_your_dispositivo_edicao_dinamica'))