user: factor out illogical User.Info.superuser?/1.
authorWilliam Pitcock <nenolod@dereferenced.org>
Wed, 9 Jan 2019 06:41:25 +0000 (06:41 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Wed, 9 Jan 2019 06:44:50 +0000 (06:44 +0000)
commit0015d43e13508155462a9e5d18f19725fadd8931
tree59dace5ff9017760a34aac20e2ee71d1637b8624
parent74f48beec3bf78cd94cb6db5cbdb937505891eab
user: factor out illogical User.Info.superuser?/1.

any actual callee will be dealing with a User struct to begin with, so
just check the child struct inside User.superuser?/1 with pattern matching.
lib/pleroma/user.ex
lib/pleroma/user/info.ex