mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
import: Replace the allowAnyoneToImport
check with userCanModify
This reduces the number of hoops a user or tool must jump through to import.
This commit is contained in:
parent
831528e8bc
commit
a8cf434d1d
11 changed files with 143 additions and 109 deletions
|
@ -942,16 +942,6 @@ async function handleClientReady(client, message, authorID)
|
|||
});
|
||||
}));
|
||||
|
||||
let thisUserHasEditedThisPad = false;
|
||||
if (historicalAuthorData[authorID]) {
|
||||
/*
|
||||
* This flag is set to true when a user contributes to a specific pad for
|
||||
* the first time. It is used for deciding if importing to that pad is
|
||||
* allowed or not.
|
||||
*/
|
||||
thisUserHasEditedThisPad = true;
|
||||
}
|
||||
|
||||
// glue the clientVars together, send them and tell the other clients that a new one is there
|
||||
|
||||
// Check that the client is still here. It might have disconnected between callbacks.
|
||||
|
@ -1135,8 +1125,6 @@ async function handleClientReady(client, message, authorID)
|
|||
"percentageToScrollWhenUserPressesArrowUp": settings.scrollWhenFocusLineIsOutOfViewport.percentageToScrollWhenUserPressesArrowUp,
|
||||
},
|
||||
"initialChangesets": [], // FIXME: REMOVE THIS SHIT
|
||||
"thisUserHasEditedThisPad": thisUserHasEditedThisPad,
|
||||
"allowAnyoneToImport": settings.allowAnyoneToImport
|
||||
}
|
||||
|
||||
// Add a username to the clientVars if one avaiable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue