mirror of
https://github.com/overleaf/overleaf.git
synced 2024-09-16 02:52:31 -04:00
14 lines
416 B
CoffeeScript
14 lines
416 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()
|
|
when 'github-sync'
|
|
return Settings.enableGithubSync
|
|
else
|
|
throw new Error("unknown feature: #{feature}")
|