         cb()
 
     checkRequiredAffiliation: (t, cb) ->
-        if AFFILIATIONS.indexOf(@actorAffiliation) >= AFFILIATIONS.indexOf(@requiredAffiliation)
+        if isAffiliationAtLeast @actorAffiliation, @requiredAffiliation
             cb()
         else
             cb new errors.Forbidden("Requires affiliation #{@requiredAffiliation} (you are #{@actorAffiliation})")

    'outcast', 'none', 'member',
    'publisher', 'moderator', 'owner'
]
class PrivilegedOperation extends ModelOperation

    transaction: (t, cb) ->

            when 'open'
                pass = true
            when 'members'
                pass = isAffiliationAtLeast @actorAffiliation, 'member'
            when 'publishers'
                pass = isAffiliationAtLeast @actorAffiliation, 'publishers'
            else
                # Owners can always post
                pass = (@actorAffiliation is 'owner')
