Add is_admin method to Element and User classes
authorJeremy Stanley <fungi@yuggoth.org>
Wed, 30 Sep 2020 19:57:13 +0000 (19:57 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Wed, 30 Sep 2020 19:57:13 +0000 (19:57 +0000)
For clarity and convenience, create an is_admin() boolean check for
whether a User's account or an actor Element's owner's account is
flagged as an administrator. Put them to use in places where the
administrator facet was previously checked directly. This allows us
to do a little additional safety checking to avoid hitting corner
cases where we try to check some object which may or may not have an
owner.


No differences found