'Checks whether the current user has a permission
:type permission: str
:rtype: bool'

def has_permission(self, context, permission):

    if (context.user.name == 'root'):
        return True
    if (not (permission in context.user.permissions)):
        return False
    return True
