An issue exists in Mattermost Server prior to 5.8.0, when Town Square is set to Read-Only. Users can pin or unpin a post.
mattermost mattermost server