# coding=utf8
from __future__ import unicode_literals, absolute_import, print_function


class Permissions(object):

    OPERATION_GROUP_NAME = '社区组'

    @classmethod
    def can_do_operation(cls, user):
        if not user or not user.is_authenticated():
            return False
        return user.groups.filter(name=cls.OPERATION_GROUP_NAME).exists()
