Allow admins to become teachers

This commit is contained in:
phoenixeliot 2016-07-28 15:14:43 -07:00
parent 00221e6c91
commit a47bdc084a
2 changed files with 1 additions and 1 deletions

View file

@ -181,6 +181,7 @@ module.exports = class Tracker extends CocoClass
ga? 'send', 'timing', category, variable, duration, label
updateRole: ->
return if me.isAdmin()
return unless me.isTeacher()
return require('core/services/segment')() unless @segmentLoaded
@identify()

View file

@ -92,7 +92,6 @@ module.exports = class User extends CocoModel
Boolean((utils.getQueryVariable('dev', false) or me.isTeacher()) and utils.getQueryVariable('course', false))
setRole: (role, force=false) ->
return if me.isAdmin()
oldRole = @get 'role'
return if oldRole is role or (oldRole and not force)
@set 'role', role