Пример #1
0
def news_mail_subscribed_users_show(context, data_dict):
    '''
        Authorization check for news delete
    '''
    success = _h.user_is_sysadmin(context)
    if not success:
        success = _h.user_is_editor(context)
    out = {'success': success}
    return out
Пример #2
0
def news_delete(context, data_dict):
    '''
        Authorization check for news delete
    '''
    success = _h.user_is_sysadmin(context)
    if not success:
        success = _h.user_is_editor(context)
    out = {
        'success': success,
        'msg': '' if success else t._('User not authorized to delete news')
    }
    return out