Add missed Features.coffee
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
Settings = require 'settings-sharelatex'
|
||||
|
||||
module.exports = Features =
|
||||
externalAuthenticationSystemUsed: ->
|
||||
Settings.ldap? or Settings.saml? or Settings.overleaf?.oauth?
|
||||
|
||||
hasFeature: (feature) ->
|
||||
switch feature
|
||||
when 'registration'
|
||||
return not Features.externalAuthenticationSystemUsed()
|
||||
else
|
||||
throw new Error("unknown feature: #{feature}")
|
||||
Reference in New Issue
Block a user