From 00eff653cba9c37820155ec8268bb4cfa809fed2 Mon Sep 17 00:00:00 2001 From: Kim Gardner Date: Tue, 30 Jan 2018 12:21:10 -0500 Subject: [PATCH 1/5] Update version to 4.1.0 and update LICENSE --- LICENSE | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index e0a687532..5beee04b4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2017 Mozilla Foundation +Copyright 2018 Mozilla Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/package.json b/package.json index b3afdc9b6..6a3b1b447 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "talk", - "version": "4.0.0", + "version": "4.1.0", "description": "A better commenting experience from Mozilla, The New York Times, and the Washington Post. https://coralproject.net", "main": "app.js", "private": true, From ec54376a53918879e2a78126ed8b76ecbefc1c62 Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Tue, 30 Jan 2018 11:00:48 -0700 Subject: [PATCH 2/5] blocked user actions in username change process --- .../src/components/CommentLabels.js | 3 ++- .../src/routes/Community/components/People.js | 14 +++++++---- .../coral-embed-stream/src/graphql/index.js | 3 ++- .../src/tabs/stream/components/Comment.js | 5 ++-- client/coral-framework/constants/roles.js | 4 ++++ .../constants/usernameStatus.js | 22 +++++++++++++++++ client/coral-framework/services/perms.js | 24 ++++++++++++------- 7 files changed, 58 insertions(+), 17 deletions(-) create mode 100644 client/coral-framework/constants/roles.js create mode 100644 client/coral-framework/constants/usernameStatus.js diff --git a/client/coral-admin/src/components/CommentLabels.js b/client/coral-admin/src/components/CommentLabels.js index e50d53632..8eac152bd 100644 --- a/client/coral-admin/src/components/CommentLabels.js +++ b/client/coral-admin/src/components/CommentLabels.js @@ -5,8 +5,9 @@ import Slot from 'coral-framework/components/Slot'; import FlagLabel from 'coral-ui/components/FlagLabel'; import cn from 'classnames'; import styles from './CommentLabels.css'; +import { ADMIN, MODERATOR, STAFF } from 'coral-framework/constants/roles'; -const staffRoles = ['ADMIN', 'STAFF', 'MODERATOR']; +const staffRoles = [ADMIN, MODERATOR, STAFF]; function isUserFlagged(actions) { return actions.some( diff --git a/client/coral-admin/src/routes/Community/components/People.js b/client/coral-admin/src/routes/Community/components/People.js index 0328d148b..1f5e4bab8 100644 --- a/client/coral-admin/src/routes/Community/components/People.js +++ b/client/coral-admin/src/routes/Community/components/People.js @@ -10,6 +10,12 @@ import ActionsMenu from 'coral-admin/src/components/ActionsMenu'; import ActionsMenuItem from 'coral-admin/src/components/ActionsMenuItem'; import { isSuspended, isBanned } from 'coral-framework/utils/user'; import moment from 'moment'; +import { + ADMIN, + COMMENTER, + MODERATOR, + STAFF, +} from 'coral-framework/constants/roles'; const headers = [ { @@ -200,19 +206,19 @@ class People extends React.Component { onChange={role => setUserRole(user.id, role)} >