Merge branch 'master' of github.com:coralproject/talk into moderate-bio

This commit is contained in:
David Jay
2017-01-26 16:38:43 -05:00
50 changed files with 694 additions and 1134 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ module.exports = (context) => {
// TODO: refactor to something that'll return an error in the event an attempt
// is made to mutate state while not logged in. There's got to be a better way
// to do this.
if (context.user) {
if (context.user && context.user.can('mutation:createAction', 'mutation:deleteAction')) {
return {
Action: {
create: (action) => createAction(context, action),
+1 -1
View File
@@ -144,7 +144,7 @@ module.exports = (context) => {
// TODO: refactor to something that'll return an error in the event an attempt
// is made to mutate state while not logged in. There's got to be a better way
// to do this.
if (context.user) {
if (context.user && context.user.can('mutation:createComment')) {
return {
Comment: {
create: (comment) => createPublicComment(context, comment)
+1 -1
View File
@@ -15,7 +15,7 @@ module.exports = (context) => {
// TODO: refactor to something that'll return an error in the event an attempt
// is made to mutate state while not logged in. There's got to be a better way
// to do this.
if (context.user) {
if (context.user && context.user.can('mutation:updateUserSettings')) {
return {
User: {
updateSettings: (settings) => updateUserSettings(context, settings)