def check_write_block(self, brl_block):
        try:
            block_access = self._store.read_block_permissions(brl_block)
        except NotFoundException:
            return self.check_create_block(brl_block.owner, False)

        # If block is private, check auth_user can read it and owner is paying
        if block_access.is_private:
            # Check limits are ok, If its free will raise
            self.check_subscription_limit_reached(brl_block.owner)

        # Check if auth_user has write permissions
        if self._can_act_as_admin_of(brl_block.owner) is not True:
            if not block_access.write.is_granted(self.auth_user):
                raise ForbiddenException("Permission denied: Writing block '%s'" % brl_block)

    # Check Publish
dataset/ETHPy150Open biicode/bii-server/authorize.py/Security.check_write_block/original