mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 09:35:39 -05:00
Allow admins to become teachers
This commit is contained in:
parent
00221e6c91
commit
a47bdc084a
2 changed files with 1 additions and 1 deletions
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue