Change all lines setting readonly from being admin only to being authenticated only

This commit is contained in:
dpen2000 2014-04-25 01:25:16 +01:00
parent 0de5e715c7
commit 3165a2b654
5 changed files with 7 additions and 7 deletions

View file

@ -49,7 +49,7 @@ module.exports = class ArticleEditView extends View
data: data
filePath: "db/thang.type/#{@article.get('original')}"
schema: Article.schema
readOnly: true unless me.isAdmin() or @article.hasWriteAccess(me)
readOnly: me.get('anonymous')
callbacks:
change: @pushChangesToPreview
@treema = @$el.find('#article-treema').treema(options)

View file

@ -57,7 +57,7 @@ module.exports = class ScriptsTabView extends View
thangIDs: thangIDs
dimensions: @dimensions
supermodel: @supermodel
readOnly: true unless me.isAdmin() or @level.hasWriteAccess(me)
readOnly: me.get('anonymous')
callbacks:
change: @onScriptChanged
nodeClasses:

View file

@ -34,7 +34,7 @@ module.exports = class SettingsTabView extends View
supermodel: @supermodel
schema: schema
data: data
readOnly: true unless me.isAdmin() or @level.hasWriteAccess(me)
readOnly: me.get('anonymous')
callbacks: {change: @onSettingsChanged}
thangIDs: thangIDs
nodeClasses:

View file

@ -49,7 +49,7 @@ module.exports = class LevelSystemEditView extends View
schema: schema
data: data
callbacks: {change: @onSystemSettingsEdited}
treemaOptions.readOnly = true unless me.isAdmin()
treemaOptions.readOnly = me.get('anonymous')
@systemSettingsTreema = @$el.find('#edit-system-treema').treema treemaOptions
@systemSettingsTreema.build()
@systemSettingsTreema.open()
@ -67,7 +67,7 @@ module.exports = class LevelSystemEditView extends View
schema: LevelSystem.schema.properties.configSchema
data: @levelSystem.get 'configSchema'
callbacks: {change: @onConfigSchemaEdited}
treemaOptions.readOnly = true unless me.isAdmin()
treemaOptions.readOnly = me.get('anonymous')
@configSchemaTreema = @$el.find('#config-schema-treema').treema treemaOptions
@configSchemaTreema.build()
@configSchemaTreema.open()
@ -83,7 +83,7 @@ module.exports = class LevelSystemEditView extends View
editorEl = $('<div></div>').text(@levelSystem.get('code')).addClass('inner-editor')
@$el.find('#system-code-editor').empty().append(editorEl)
@editor = ace.edit(editorEl[0])
@editor.setReadOnly(not me.isAdmin())
@editor.setReadOnly(me.get('anonymous'))
session = @editor.getSession()
session.setMode 'ace/mode/coffee'
session.setTabSize 2

View file

@ -65,7 +65,7 @@ module.exports = class SystemsTabView extends View
supermodel: @supermodel
schema: Level.schema.properties.systems
data: systems
readOnly: true unless me.isAdmin() or @level.hasWriteAccess(me)
readOnly: me.get('anonymous')
callbacks:
change: @onSystemsChanged
select: @onSystemSelected