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
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