refactor(guestbook): ask permissions instead of the rights number
The guestbook asked the number in five places and meant four different things. Emptying it
is guestbook.clear, editing and deleting the entries of others is guestbook.entry.manage,
the reply shown as coming from the staff is guestbook.entry.reply, and the admin club — the
second guestbook behind the same pages — is guestbook.admin_club.view. The list of accounts
allowed into the club by hand stays where it was, next to the permission.
The reply link stops lying. It appeared on every entry the visitor could edit, while the
screen behind it asked for a super moderator: it now asks the permission the screen asks.
Under an entry there were two things at once — where it came from and what may be done to
it — and one number decided both. They are two permissions now, so the meta block carries
either half on its own: users.origin.view brings the address and the user agent,
guestbook.entry.manage brings the buttons.
RoleLevels learns to answer about a whole page at once. Comparing the visitor against the
author of every entry would have been a query per row; grantedLevelsFor() asks the roles
of all the authors in one, and a test holds it to the same answer the per-account call
gives.
The profile module asks guestbook.admin_club.view too, which was the number it had left:
whether the entries of the club count as somebody's activity is the guestbook's question.
An installation that has already run auth:apply-default-permissions needs it once more
with --force.