mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04:00
12 lines
357 B
CoffeeScript
12 lines
357 B
CoffeeScript
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}")
|