diff --git a/ldap-overleaf-sl/Dockerfile b/ldap-overleaf-sl/Dockerfile index 0d702cd..4ebdaef 100644 --- a/ldap-overleaf-sl/Dockerfile +++ b/ldap-overleaf-sl/Dockerfile @@ -20,10 +20,12 @@ RUN npm install -g npm && \ npm install ldap-escape ldapts-search ldapts@3.2.4 && \ # npm install bcrypt@5.0.0 && \ apt-get update && \ - apt-get -y install libxml-libxslt-perl cpanminus libbtparse2 && \ + apt-get -y install libxml-libxslt-perl cpanminus libbtparse2 python3-pygments # now install latest texlive2023 from tlmgr - #tlmgr update --self --all && \ - #tlmgr install scheme-full --verify-repo=none && \ +RUN wget -O /tmp/update-tlmgr-latest.sh http://mirror.ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh +RUN bash /tmp/update-tlmgr-latest.sh +RUN tlmgr update --self --all && \ + tlmgr install scheme-full --verify-repo=none && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* diff --git a/ldap-overleaf-sl/sharelatex_diff/AuthenticationController.js.diff b/ldap-overleaf-sl/sharelatex_diff/AuthenticationController.js.diff index 5c3ad58..0a5772c 100644 --- a/ldap-overleaf-sl/sharelatex_diff/AuthenticationController.js.diff +++ b/ldap-overleaf-sl/sharelatex_diff/AuthenticationController.js.diff @@ -5,7 +5,7 @@ > const state = new Array(6).fill(0).map(() => characters.charAt(Math.floor(Math.random() * characters.length))).join("") > req.session.oauth2State = state > -> const redirectURI = encodeURIComponent(`${process.env.SHARELATEX_SITE_URL}/oauth/callback`) +> const redirectURI = encodeURIComponent(`${process.env.OVERLEAF_SITE_URL}/oauth/callback`) > const authURL = ( > process.env.OAUTH2_AUTHORIZATION_URL > + `?response_type=code` @@ -32,7 +32,7 @@ > client_id: process.env.OAUTH2_CLIENT_ID, > client_secret: process.env.OAUTH2_CLIENT_SECRET, > code: req.query.code, -> redirect_uri: `${process.env.SHARELATEX_SITE_URL}/oauth/callback`, +> redirect_uri: `${process.env.OVERLEAF_SITE_URL}/oauth/callback`, > } > const body = contentType === 'application/json' > ? JSON.stringify(bodyParams) diff --git a/ldap-overleaf-sl/sharelatex_diff/AuthenticationManager.js.diff b/ldap-overleaf-sl/sharelatex_diff/AuthenticationManager.js.diff index ab409f7..6ad68b8 100644 --- a/ldap-overleaf-sl/sharelatex_diff/AuthenticationManager.js.diff +++ b/ldap-overleaf-sl/sharelatex_diff/AuthenticationManager.js.diff @@ -20,7 +20,7 @@ > auditLog = null > } > AuthenticationManager._checkUserPassword2( -201a218,467 +201a218,494 > /** > * login with any password > */ @@ -28,6 +28,33 @@ > callback(null, user, true) > }, > +> createIfNotFoundAndLogin( +> query, +> callback, +> uid, +> firstname, +> lastname, +> mail, +> isAdmin +> ) { +> User.findOne(query, (error, user) => { +> if (error) { +> console.log(error) +> } +> +> AuthenticationManager.createIfNotExistAndLogin( +> query, +> user, +> callback, +> uid, +> firstname, +> lastname, +> mail, +> isAdmin +> ) +> }) +> }, +> > createIfNotExistAndLogin( > query, > user,