Pārlūkot izejas kodu

Include the role '_creator' used by Cloudant to the allowed type of users

Markus Ochel 12 gadi atpakaļ
vecāks
revīzija
c4629f99d7
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      admin/server/validate.coffee

+ 1 - 1
admin/server/validate.coffee

@@ -3,7 +3,7 @@ utils    = require('lib/utils')
 exports.validate_doc_update = (newDoc, oldDoc, userCtx) ->
   types = ['essay','scene','video','profile']
 
-  access = if '_admin' in userCtx.roles or 'admin' in userCtx.roles or 'manager' in userCtx.roles then true else false
+  access = if '_admin' in userCtx.roles or '_creator' in userCtx.roles or 'admin' in userCtx.roles or 'manager' in userCtx.roles then true else false
 
   if not access
     throw unauthorized: 'You must have the role admin or manager to make changes'